codeql-go icon indicating copy to clipboard operation
codeql-go copied to clipboard

Add support for variadic functions in container flow

Open sauyon opened this issue 3 years ago • 2 comments

/cc @owen-mc

sauyon avatar Dec 15 '21 04:12 sauyon

Like the concept, but it doesn't compile: Expected a predicate with result but found 'ParameterNode.isParameterOf(Callable c, int i)', which is a predicate without result

smowton avatar Dec 15 '21 12:12 smowton

Thinking about this further, I don't think the dataflow lib will accept us defining a store step that also transits a function boundary. Instead we should store into a synthetic node representing the array, then pass the array to the callee.

Java takes this approach, calling the synthetic node ImplicitVarargsArray.

smowton avatar Dec 15 '21 15:12 smowton