Skip to content

Commit 1ba2623

Browse files
authored
Merge pull request github#6585 from rvermeulen/patch-3
Update qldoc for the Access class
2 parents 10f6cab + 7310590 commit 1ba2623

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

cpp/ql/lib/semmle/code/cpp/exprs/Access.qll

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import semmle.code.cpp.Enum
99
private 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
*/
1414
class 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
*/
354363
class FunctionAccess extends Access, @routineexpr {
355364
FunctionAccess() { not iscall(underlyingElement(this), _) }

0 commit comments

Comments
 (0)