Skip to content

Commit b928f13

Browse files
committed
Add CallExpr.hasImplicitArgs()
1 parent f3c1c53 commit b928f13

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

go/ql/lib/semmle/go/Expr.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,12 @@ class CallExpr extends CallOrConversionExpr {
857857
/** Gets the number of argument expressions of this call. */
858858
int getNumArgument() { result = count(this.getAnArgument()) }
859859

860+
/** Holds if this call has implicit variadic arguments. */
861+
predicate hasImplicitVarargs() {
862+
this.getCalleeType().isVariadic() and
863+
not this.hasEllipsis()
864+
}
865+
860866
/**
861867
* Gets an argument with an ellipsis after it which is passed to a varargs
862868
* parameter, as in `f(x...)`.

0 commit comments

Comments
 (0)