Skip to content

Commit 53a87fa

Browse files
committed
C++: accept field flow test changes after merge
1 parent 0d2f8f3 commit 53a87fa

File tree

8 files changed

+287
-13
lines changed

8 files changed

+287
-13
lines changed

cpp/ql/test/library-tests/dataflow/fields/A.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ class A
5353
{
5454
B *b = new B();
5555
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
5858
}
5959

6060
void f3()

cpp/ql/test/library-tests/dataflow/fields/C.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ class C
2626

2727
void func()
2828
{
29-
sink(s1); // $ast $f-:ir
29+
sink(s1); // $ast $ir
3030
sink(s2); // $f-:ast $f-:ir
31-
sink(s3); // $ast $f-:ir
31+
sink(s3); // $ast $ir
3232
sink(s4); // $f-:ast $f-:ir
3333
}
3434

cpp/ql/test/library-tests/dataflow/fields/by_reference.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,19 @@ struct S {
4848
void test_setDirectly() {
4949
S s;
5050
s.setDirectly(user_input());
51-
sink(s.getDirectly()); // $ast $f-:ir
51+
sink(s.getDirectly()); // $ast $ir
5252
}
5353

5454
void test_setIndirectly() {
5555
S s;
5656
s.setIndirectly(user_input());
57-
sink(s.getIndirectly()); // $ast $f-:ir
57+
sink(s.getIndirectly()); // $ast $ir
5858
}
5959

6060
void test_setThroughNonMember() {
6161
S s;
6262
s.setThroughNonMember(user_input());
63-
sink(s.getThroughNonMember()); // $ast $f-:ir
63+
sink(s.getThroughNonMember()); // $ast $ir
6464
}
6565

6666
void test_nonMemberSetA() {

cpp/ql/test/library-tests/dataflow/fields/complex.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ void bar(Outer &b)
4848
// in _some_ access path somewhere in the search. That makes the library conclude
4949
// that there could be flow to `b.inner.f.a_` even when the flow was actually to
5050
// `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
5353
}
5454

5555
void foo()

cpp/ql/test/library-tests/dataflow/fields/constructors.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class Foo
2525

2626
void bar(Foo &f)
2727
{
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
3030
}
3131

3232
void foo()
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| file://:0:0:0:0 | (const void *)... | Unexpected result: ir= |

cpp/ql/test/library-tests/dataflow/fields/ir-path-flow.expected

Lines changed: 273 additions & 0 deletions
Large diffs are not rendered by default.

cpp/ql/test/library-tests/dataflow/fields/simple.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class Foo
2525

2626
void bar(Foo &f)
2727
{
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
3030
}
3131

3232
void foo()

0 commit comments

Comments
 (0)