File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
cpp/ql/lib/semmle/code/cpp/exprs Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import semmle.code.cpp.Enum
99private import semmle.code.cpp.dataflow.EscapesTree
1010
1111/**
12- * A C/C++ access expression. This refers to a function, variable, or enum constant.
12+ * A C/C++ access expression. This refers to a function (excluding function references in function call expressions) , variable, or enum constant.
1313 */
1414class Access extends Expr , NameQualifiableElement , @access {
1515 // As `@access` is a union type containing `@routineexpr` (which describes function accesses
@@ -350,6 +350,15 @@ class PointerToFieldLiteral extends ImplicitThisFieldAccess {
350350 * int (*myFunctionPointer)(int) = &myFunctionTarget;
351351 * }
352352 * ```
353+ * This excludes function accesses in function call expressions.
354+ * For example the access `myFunctionTarget` in `myFunction` in the following code:
355+ * ```
356+ * int myFunctionTarget(int);
357+ *
358+ * void myFunction() {
359+ * myFunctionTarget(1);
360+ * }
361+ * ```
353362 */
354363class FunctionAccess extends Access , @routineexpr {
355364 FunctionAccess ( ) { not iscall ( underlyingElement ( this ) , _) }
You can’t perform that action at this time.
0 commit comments