forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDebug.ql
More file actions
21 lines (18 loc) · 687 Bytes
/
Debug.ql
File metadata and controls
21 lines (18 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
* @name Debug - find out what a particular function-pointer points to
* @description Query to help investigate mysterious results with ReturnStackAllocatedObject
* @kind table
* @id cpp/points-to/debug
* @deprecated This query is not suitable for production use and has been deprecated.
*/
import cpp
import semmle.code.cpp.pointsto.PointsTo
class FieldAccessPT extends PointsToExpr {
override predicate interesting() { this instanceof FieldAccess }
}
from Function outer, FieldAccessPT fa
where
outer.hasName("rtLnDeliverableMayContainDividends") and
fa.(FieldAccess).getTarget().hasName("pfFunction") and
fa.getEnclosingFunction() = outer
select fa, fa.pointsTo()