We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f095db commit f3c1c53Copy full SHA for f3c1c53
1 file changed
go/ql/lib/semmle/go/Expr.qll
@@ -885,6 +885,15 @@ class CallExpr extends CallOrConversionExpr {
885
)
886
}
887
888
+ /**
889
+ * Gets the signature type of the invoked function.
890
+ *
891
+ * Note that it avoids calling `getTarget()` so that it works even when that
892
+ * predicate isn't defined, for example when calling a variable with function
893
+ * type.
894
+ */
895
+ SignatureType getCalleeType() { result = this.getCalleeExpr().getType() }
896
+
897
/** Gets the declared target of this call. */
898
Function getTarget() { this.getCalleeExpr() = result.getAReference() }
899
0 commit comments