C++: Modify IR field flow tests to use InlineExpectationsTest.qll

This commit is contained in:
Mathias Vorreiter Pedersen
2020-05-14 11:11:21 +02:00
parent 34314d0cb6
commit f5f3405ec3
16 changed files with 126 additions and 1039 deletions

View File

@@ -41,8 +41,8 @@ void bar(Bar &b)
// then it tracks that both `a_` and `b_` have followed `f` in _some_ access
// path somewhere in the search. That makes the library conclude that there
// could be flow to `b.f.a_` even when the flow was actually to `b.f.b_`.
sink(b.f.a()); // flow [FALSE POSITIVE through `b2.f.setB` and `b3.f.setB` in AST, NOT DETECTED by IR]
sink(b.f.b()); // flow [FALSE POSITIVE through `b1.f.setA` (AST) and `b3.f.setA` in AST, NOT DETECTED by IR]
sink(b.f.a()); //$ast=flow 55:13 $ast=flow 57:13 $f-:ir=flow
sink(b.f.b()); //$ast=flow 56:13 $ast=flow 58:13 $f-:ir=flow
}
void foo()