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
9
9
private import semmle.code.cpp.dataflow.EscapesTree
10
10
11
11
/**
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.
13
13
*/
14
14
class Access extends Expr , NameQualifiableElement , @access {
15
15
// As `@access` is a union type containing `@routineexpr` (which describes function accesses
@@ -350,6 +350,15 @@ class PointerToFieldLiteral extends ImplicitThisFieldAccess {
350
350
* int (*myFunctionPointer)(int) = &myFunctionTarget;
351
351
* }
352
352
* ```
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
+ * ```
353
362
*/
354
363
class FunctionAccess extends Access , @routineexpr {
355
364
FunctionAccess ( ) { not iscall ( underlyingElement ( this ) , _) }
You can’t perform that action at this time.
0 commit comments