Add CallExpr.hasImplicitArgs()

This commit is contained in:
Owen Mansel-Chan
2023-04-26 16:30:51 +01:00
parent f3c1c53b54
commit b928f13d94

View File

@@ -857,6 +857,12 @@ class CallExpr extends CallOrConversionExpr {
/** Gets the number of argument expressions of this call. */
int getNumArgument() { result = count(this.getAnArgument()) }
/** Holds if this call has implicit variadic arguments. */
predicate hasImplicitVarargs() {
this.getCalleeType().isVariadic() and
not this.hasEllipsis()
}
/**
* Gets an argument with an ellipsis after it which is passed to a varargs
* parameter, as in `f(x...)`.