Skip to content

Commit eec907b

Browse files
committed
C++: Update expected test results after frontend update
1 parent eddd724 commit eec907b

File tree

8 files changed

+23
-19
lines changed

8 files changed

+23
-19
lines changed

cpp/ql/test/examples/expressions/PrintAST.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ Conversion3.cpp:
324324
# 2| getExpr(): [CStyleCast] (int)...
325325
# 2| Conversion = [IntegralConversion] integral conversion
326326
# 2| Type = [IntType] int
327-
# 2| Value = [CStyleCast] 1
327+
# 2| Value = [CStyleCast] 5
328328
# 2| ValueCategory = prvalue
329329
# 2| getRightOperand().getFullyConverted(): [ParenthesisExpr] (...)
330330
# 2| Type = [IntType] int
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
| Bar::(unnamed namespace)::B | Bar::<unnamed>::B |
2-
| Foo::(unnamed namespace)::A | _ZN3Foo37_GLOBAL__N__13_funcdname_cpp_?AEv |
2+
| Foo::(unnamed namespace)::A | _ZN35_INTERNAL_13_funcdname_cpp_?Foo37_GLOBAL__N__13_funcdname_cpp_?AEv |

cpp/ql/test/library-tests/funcdname/funcdname.ql

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@ import cpp
22

33
from Function f, ReturnStmt r
44
where r.getEnclosingFunction() = f
5-
select f.getQualifiedName(), r.getExpr().getValue().regexpReplaceAll("_[0-9a-f]+AEv$", "_?AEv")
5+
select f.getQualifiedName(),
6+
r.getExpr()
7+
.getValue()
8+
.regexpReplaceAll("_[0-9a-f]+AEv$", "_?AEv")
9+
.regexpReplaceAll("cpp_[0-9a-f]+Foo37_", "cpp_?Foo37_")

cpp/ql/test/library-tests/ir/ir/PrintAST.expected

+5-5
Original file line numberDiff line numberDiff line change
@@ -23814,11 +23814,11 @@ ir.cpp:
2381423814
# 2692| Conversion = [IntegralConversion] integral conversion
2381523815
# 2692| Type = [LongType] unsigned long
2381623816
# 2692| ValueCategory = prvalue
23817-
#-----| getExpr().getFullyConverted(): [CStyleCast] (int)...
23818-
#-----| Conversion = [IntegralConversion] integral conversion
23819-
#-----| Type = [IntType] int
23820-
#-----| Value = [CStyleCast] 1
23821-
#-----| ValueCategory = prvalue
23817+
# 2692| getExpr().getFullyConverted(): [CStyleCast] (int)...
23818+
# 2692| Conversion = [IntegralConversion] integral conversion
23819+
# 2692| Type = [IntType] int
23820+
# 2692| Value = [CStyleCast] 1
23821+
# 2692| ValueCategory = prvalue
2382223822
# 2693| getStmt(1): [ReturnStmt] return ...
2382323823
# 2693| getExpr(): [VariableAccess] y
2382423824
# 2693| Type = [IntType] int

cpp/ql/test/library-tests/ir/ir/aliased_ir.expected

+3-3
Original file line numberDiff line numberDiff line change
@@ -19457,11 +19457,11 @@ ir.cpp:
1945719457
# 2691| m2691_3(unknown) = InitializeNonLocal :
1945819458
# 2691| m2691_4(unknown) = Chi : total:m2691_2, partial:m2691_3
1945919459
# 2692| r2692_1(glval<int>) = VariableAddress[y] :
19460-
#-----| r0_1(int) = Constant[1] :
19461-
#-----| m0_2(int) = Store[y] : &:r2692_1, r0_1
19460+
# 2692| r2692_2(int) = Constant[1] :
19461+
# 2692| m2692_3(int) = Store[y] : &:r2692_1, r2692_2
1946219462
# 2693| r2693_1(glval<int>) = VariableAddress[#return] :
1946319463
# 2693| r2693_2(glval<int>) = VariableAddress[y] :
19464-
# 2693| r2693_3(int) = Load[y] : &:r2693_2, m0_2
19464+
# 2693| r2693_3(int) = Load[y] : &:r2693_2, m2692_3
1946519465
# 2693| m2693_4(int) = Store[#return] : &:r2693_1, r2693_3
1946619466
# 2691| r2691_5(glval<int>) = VariableAddress[#return] :
1946719467
# 2691| v2691_6(void) = ReturnValue : &:r2691_5, m2693_4

cpp/ql/test/library-tests/ir/ir/raw_ir.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -17775,8 +17775,8 @@ ir.cpp:
1777517775
# 2691| mu2691_2(unknown) = AliasedDefinition :
1777617776
# 2691| mu2691_3(unknown) = InitializeNonLocal :
1777717777
# 2692| r2692_1(glval<int>) = VariableAddress[y] :
17778-
#-----| r0_1(int) = Constant[1] :
17779-
#-----| mu0_2(int) = Store[y] : &:r2692_1, r0_1
17778+
# 2692| r2692_2(int) = Constant[1] :
17779+
# 2692| mu2692_3(int) = Store[y] : &:r2692_1, r2692_2
1778017780
# 2693| r2693_1(glval<int>) = VariableAddress[#return] :
1778117781
# 2693| r2693_2(glval<int>) = VariableAddress[y] :
1778217782
# 2693| r2693_3(int) = Load[y] : &:r2693_2, ~m?

cpp/ql/test/library-tests/ir/range-analysis/SimpleRangeAnalysis_tests.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1011,10 +1011,10 @@ void test_overflow() {
10111011
range(x); // $ range===2147483647
10121012
const int y = 256;
10131013
range(y); // $ range===256
1014-
if ((x + y) <= 512) {
1014+
if ((x + y) <= 512) { // $ overflow=+
10151015
range(x); // $ range===2147483647
10161016
range(y); // $ range===256
1017-
range(x + y); // $ range===-2147483393
1017+
range(x + y); // $ range=<=2147483903 overflow=+
10181018
}
10191019
}
10201020

Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
| test.cpp:3:8:3:8 | C<1> | 0 | int | test.cpp:5:25:5:25 | 1 | 1 |
2-
| test.cpp:3:8:3:8 | C<2> | 0 | int | file://:0:0:0:0 | 2 | 2 |
1+
| test.cpp:3:8:3:8 | C<1> | 0 | int | test.cpp:6:3:6:6 | one1 | 1 |
2+
| test.cpp:3:8:3:8 | C<2> | 0 | int | test.cpp:7:3:7:13 | ... + ... | 2 |
33
| test.cpp:3:8:3:8 | C<x> | 0 | int | file://:0:0:0:0 | x | x |
44
| test.cpp:10:8:10:8 | D<T, X> | 0 | <none> | test.cpp:9:19:9:19 | T | <none> |
55
| test.cpp:10:8:10:8 | D<T, X> | 1 | T | file://:0:0:0:0 | X | X |
66
| test.cpp:10:8:10:8 | D<int, 2> | 0 | <none> | file://:0:0:0:0 | int | <none> |
77
| test.cpp:10:8:10:8 | D<int, 2> | 1 | int | test.cpp:12:8:12:8 | 2 | 2 |
88
| test.cpp:10:8:10:8 | D<long, 2L> | 0 | <none> | file://:0:0:0:0 | long | <none> |
9-
| test.cpp:10:8:10:8 | D<long, 2L> | 1 | long | file://:0:0:0:0 | 2 | 2 |
9+
| test.cpp:10:8:10:8 | D<long, 2L> | 1 | long | test.cpp:13:9:13:9 | 2 | 2 |
1010
| test.cpp:16:8:16:8 | E<T, X> | 0 | <none> | test.cpp:15:19:15:19 | T | <none> |
1111
| test.cpp:16:8:16:8 | E<T, X> | 1 | T * | file://:0:0:0:0 | X | X |
1212
| test.cpp:16:8:16:8 | E<int, (int *)nullptr> | 0 | <none> | file://:0:0:0:0 | int | <none> |
13-
| test.cpp:16:8:16:8 | E<int, (int *)nullptr> | 1 | int * | file://:0:0:0:0 | 0 | 0 |
13+
| test.cpp:16:8:16:8 | E<int, (int *)nullptr> | 1 | int * | test.cpp:18:8:18:14 | 0 | 0 |

0 commit comments

Comments
 (0)