Functions should have an automatic lifetime to be used in synthesizable code.
function logic [2:0] foo( // Noncompliant: No "automatic" lifetime logic [2:0] a, logic [2:0] b ); return a ^ b; endfunction : foo
function automatic logic [2:0] foo( logic [2:0] a, logic [2:0] b ); return a ^ b; endfunction : foo