CodeQL library for Go
codeql/go-all 0.7.15-dev (changelog, source)
Search

Member predicate Public::CallNode::getArgument

Gets the data flow node corresponding to the ith argument of this call.

Note that the first argument in calls to the built-in function make is a type, which is not a data-flow node. It is skipped for the purposes of this predicate, so the (syntactically) second argument becomes the first argument in terms of data flow.

For calls of the form f(g()) where g has multiple results, the arguments of the call to i are the (implicit) element extraction nodes for the call to g.

Returns a single Node corresponding to a variadic parameter. If there is no corresponding argument with an ellipsis (...), then it is a ImplicitVarargsSlice. This is in contrast to getArgument on CallExpr, which gets the syntactic arguments. Use getSyntacticArgument to get that behavior.

Node getArgument(int i)