File tree Expand file tree Collapse file tree 8 files changed +287
-13
lines changed
cpp/ql/test/library-tests/dataflow/fields Expand file tree Collapse file tree 8 files changed +287
-13
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ class A
53
53
{
54
54
B *b = new B ();
55
55
b->set (new C1 ());
56
- sink (b->get ()); // $ast $f-:ir
57
- sink ((new B (new C ()))->get ()); // $ast $f-: ir
56
+ sink (b->get ()); // $ast $ir=55:12
57
+ sink ((new B (new C ()))->get ()); // $ast $ir
58
58
}
59
59
60
60
void f3 ()
Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ class C
26
26
27
27
void func ()
28
28
{
29
- sink (s1); // $ast $f-: ir
29
+ sink (s1); // $ast $ir
30
30
sink (s2); // $f-:ast $f-:ir
31
- sink (s3); // $ast $f-: ir
31
+ sink (s3); // $ast $ir
32
32
sink (s4); // $f-:ast $f-:ir
33
33
}
34
34
Original file line number Diff line number Diff line change @@ -48,19 +48,19 @@ struct S {
48
48
void test_setDirectly () {
49
49
S s;
50
50
s.setDirectly (user_input ());
51
- sink (s.getDirectly ()); // $ast $f-: ir
51
+ sink (s.getDirectly ()); // $ast $ir
52
52
}
53
53
54
54
void test_setIndirectly () {
55
55
S s;
56
56
s.setIndirectly (user_input ());
57
- sink (s.getIndirectly ()); // $ast $f-: ir
57
+ sink (s.getIndirectly ()); // $ast $ir
58
58
}
59
59
60
60
void test_setThroughNonMember () {
61
61
S s;
62
62
s.setThroughNonMember (user_input ());
63
- sink (s.getThroughNonMember ()); // $ast $f-: ir
63
+ sink (s.getThroughNonMember ()); // $ast $ir
64
64
}
65
65
66
66
void test_nonMemberSetA () {
Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ void bar(Outer &b)
48
48
// in _some_ access path somewhere in the search. That makes the library conclude
49
49
// that there could be flow to `b.inner.f.a_` even when the flow was actually to
50
50
// `b.inner.f.b_`.
51
- sink (b.inner .f .a ()); // $ast=62:19 $f+:ast=63:19 $ast=64:19 $f+:ast=65:19 $f-:ir
52
- sink (b.inner .f .b ()); // $f+:ast=62:19 $ast=63:19 $f+:ast=64:19 $ast=65:19 $f-:ir
51
+ sink (b.inner .f .a ()); // $ast=62:19 $f+:ast=63:19 $ast=64:19 $f+:ast=65:19 $ir=62:19 $ir=64:19
52
+ sink (b.inner .f .b ()); // $f+:ast=62:19 $ast=63:19 $f+:ast=64:19 $ast=65:19 $ir=63:19 $ir=65:19
53
53
}
54
54
55
55
void foo ()
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ class Foo
25
25
26
26
void bar (Foo &f)
27
27
{
28
- sink (f.a ()); // $ast=34:11 $ast=36:11 $f-:ir
29
- sink (f.b ()); // $ast=35:14 $ast=36:25 $f-:ir
28
+ sink (f.a ()); // $ast=34:11 $ast=36:11 $ir=34:11 $ir=36:11
29
+ sink (f.b ()); // $ast=35:14 $ast=36:25 $ir=35:14 $ir=36:25
30
30
}
31
31
32
32
void foo ()
Original file line number Diff line number Diff line change
1
+ | file://:0:0:0:0 | (const void *)... | Unexpected result: ir= |
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ class Foo
25
25
26
26
void bar (Foo &f)
27
27
{
28
- sink (f.a ()); // $ast=39:12 $ast=41:12 $f-:ir
29
- sink (f.b ()); // $ast=40:12 $ast=42:12 $f-:ir
28
+ sink (f.a ()); // $ast=39:12 $ast=41:12 $ir=39:12 $ir=41:12
29
+ sink (f.b ()); // $ast=40:12 $ast=42:12 $ir=40:12 $ir=42:12
30
30
}
31
31
32
32
void foo ()
You can’t perform that action at this time.
0 commit comments