Skip to content

Commit 7310590

Browse files
authored
Update qldoc FunctionAccess class
The `FunctionAccess` class doesn't capture accesses of functions in function call expressions. This update makes that explicit.
1 parent ffd2a38 commit 7310590

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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)