C++: Replace AST dataflow with IR dataflow.

This commit is contained in:
Mathias Vorreiter Pedersen
2022-10-13 11:18:12 +02:00
parent d79a7e863a
commit 41cbef81ec
50 changed files with 2471 additions and 1408 deletions

View File

@@ -95,6 +95,11 @@ predicate stackPointerFlowsToUse(Expr use, Type useType, Expr source, boolean is
cached
private PointerType getExprPtrType(Expr use) { result = use.getUnspecifiedType() }
/**
* Holds if `use` has type `useType` and `source` is an access to a stack variable
* that flows to `use`. `isLocal` is `true` if `use` is accessed via a parameter, and
* `false` otherwise.
*/
predicate stackReferenceFlowsToUse(Expr use, Type useType, Expr source, boolean isLocal) {
// Stack variables
exists(StackVariable var |