mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
C++: Modify IR field flow tests to use InlineExpectationsTest.qll
This commit is contained in:
@@ -25,8 +25,8 @@ public:
|
||||
|
||||
void bar(Foo &f)
|
||||
{
|
||||
sink(f.a()); // flow (through `f.setA` and `h.setA`)
|
||||
sink(f.b()); // flow (through `g.setB` and `h.setB`)
|
||||
sink(f.a()); //$ast=flow 39:12 $ast=flow 41:12 $f-:ir=flow
|
||||
sink(f.b()); //$ast=flow 40:12 $ast=flow 42:12 $f-:ir=flow
|
||||
}
|
||||
|
||||
void foo()
|
||||
@@ -64,7 +64,7 @@ void single_field_test()
|
||||
A a;
|
||||
a.i = user_input();
|
||||
A a2 = a;
|
||||
sink(a2.i); // flow
|
||||
sink(a2.i); //$ast,ir=flow
|
||||
}
|
||||
|
||||
struct C {
|
||||
@@ -81,7 +81,7 @@ struct C2
|
||||
|
||||
void m() {
|
||||
f2.f1 = user_input();
|
||||
sink(getf2f1()); // flow [NOT DETECTED by IR]
|
||||
sink(getf2f1()); //$ast=flow $f-:ir=flow
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user