From e08007b28737b5b888aaadbb476745d6d1b4eae4 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 30 Nov 2021 15:12:02 -0500 Subject: [PATCH] Add missing qldocs for two `isVariadic()` predicates --- ql/lib/semmle/go/Decls.qll | 1 + ql/lib/semmle/go/Scopes.qll | 1 + 2 files changed, 2 insertions(+) diff --git a/ql/lib/semmle/go/Decls.qll b/ql/lib/semmle/go/Decls.qll index ad439a4d7dd..3e3d5d1b831 100644 --- a/ql/lib/semmle/go/Decls.qll +++ b/ql/lib/semmle/go/Decls.qll @@ -137,6 +137,7 @@ class FuncDef extends @funcdef, StmtParent, ExprParent { */ DataFlow::CallNode getACall() { result.getACallee() = this } + /** Holds if this function is variadic. */ predicate isVariadic() { this.getType().isVariadic() } override string getAPrimaryQlClass() { result = "FuncDef" } diff --git a/ql/lib/semmle/go/Scopes.qll b/ql/lib/semmle/go/Scopes.qll index 4553b66ea7c..cb3468150f4 100644 --- a/ql/lib/semmle/go/Scopes.qll +++ b/ql/lib/semmle/go/Scopes.qll @@ -377,6 +377,7 @@ class Function extends ValueEntity, @functionobject { /** Gets the declaration of this function, if any. */ FuncDecl getFuncDecl() { none() } + /** Holds if this function is variadic. */ predicate isVariadic() { this.(BuiltinFunction).getName() = ["append", "make", "print", "println"] or