Skip to content

Commit faf5ba4

Browse files
author
Matthew Gretton-Dann
committed
C++: Update expected test results
1 parent df7d212 commit faf5ba4

5 files changed

Lines changed: 40 additions & 7 deletions

File tree

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ bad_asts.cpp:
6767
# 5| params:
6868
#-----| 0: [Parameter] p#0
6969
#-----| Type = [RValueReferenceType] S &&
70-
# 9| [MemberFunction] int Bad::S::MemberFunction(int)
70+
# 9| [FunctionTemplateInstantiation,MemberFunction] int Bad::S::MemberFunction<int>(int)
7171
# 9| params:
7272
# 9| 0: [Parameter] y
7373
# 9| Type = [IntType] int
@@ -79,8 +79,9 @@ bad_asts.cpp:
7979
# 10| 0: [AddExpr] ... + ...
8080
# 10| Type = [IntType] int
8181
# 10| ValueCategory = prvalue
82-
# 10| 0: [Literal] Unknown literal
82+
# 10| 0: [Literal] 6
8383
# 10| Type = [IntType] int
84+
# 10| Value = [Literal] 6
8485
# 10| ValueCategory = prvalue
8586
# 10| 1: [PointerFieldAccess] x
8687
# 10| Type = [IntType] int
@@ -91,7 +92,7 @@ bad_asts.cpp:
9192
# 10| 1: [VariableAccess] y
9293
# 10| Type = [IntType] int
9394
# 10| ValueCategory = prvalue(load)
94-
# 9| [TopLevelFunction] int MemberFunction(int)
95+
# 9| [MemberFunction,TemplateFunction] int Bad::S::MemberFunction<int>(int)
9596
# 9| params:
9697
# 9| 0: [Parameter] y
9798
# 9| Type = [IntType] int
@@ -103,9 +104,8 @@ bad_asts.cpp:
103104
# 10| 0: [AddExpr] ... + ...
104105
# 10| Type = [IntType] int
105106
# 10| ValueCategory = prvalue
106-
# 10| 0: [Literal] 6
107+
# 10| 0: [Literal] Unknown literal
107108
# 10| Type = [IntType] int
108-
# 10| Value = [Literal] 6
109109
# 10| ValueCategory = prvalue
110110
# 10| 1: [PointerFieldAccess] x
111111
# 10| Type = [IntType] int

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11
bad_asts.cpp:
2+
# 9| int Bad::S::MemberFunction<int>(int)
3+
# 9| Block 0
4+
# 9| v0_0(void) = EnterFunction :
5+
# 9| mu0_1(unknown) = AliasedDefinition :
6+
# 9| mu0_2(unknown) = UnmodeledDefinition :
7+
# 9| r0_3(glval<S>) = InitializeThis :
8+
# 9| r0_4(glval<int>) = VariableAddress[y] :
9+
# 9| mu0_5(int) = InitializeParameter[y] : &:r0_4
10+
# 10| r0_6(glval<int>) = VariableAddress[#return] :
11+
# 10| r0_7(int) = Constant[6] :
12+
#-----| r0_8(S *) = CopyValue : r0_3
13+
# 10| r0_9(glval<int>) = FieldAddress[x] : r0_8
14+
# 10| r0_10(int) = Load : &:r0_9, ~mu0_2
15+
# 10| r0_11(int) = Add : r0_7, r0_10
16+
# 10| r0_12(glval<int>) = VariableAddress[y] :
17+
# 10| r0_13(int) = Load : &:r0_12, ~mu0_2
18+
# 10| r0_14(int) = Add : r0_11, r0_13
19+
# 10| mu0_15(int) = Store : &:r0_6, r0_14
20+
# 9| r0_16(glval<int>) = VariableAddress[#return] :
21+
# 9| v0_17(void) = ReturnValue : &:r0_16, ~mu0_2
22+
# 9| v0_18(void) = UnmodeledUse : mu*
23+
# 9| v0_19(void) = ExitFunction :
24+
225
# 14| void Bad::CallBadMemberFunction()
326
# 14| Block 0
427
# 14| v0_0(void) = EnterFunction :

cpp/ql/test/library-tests/ptr_to_member/segfault/exprs.expected

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
| file://:0:0:0:0 | Unknown literal | file://:0:0:0:0 | unsigned long |
2+
| file://:0:0:0:0 | Unknown literal | file://:0:0:0:0 | unsigned long |
3+
| file://:0:0:0:0 | Unknown literal | file://:0:0:0:0 | unsigned long |
4+
| file://:0:0:0:0 | Unknown literal | file://:0:0:0:0 | unsigned long |
15
| segfault.cpp:25:46:25:65 | call to S | file://:0:0:0:0 | void |
26
| segfault.cpp:25:46:25:65 | call to S | file://:0:0:0:0 | void |
37
| segfault.cpp:25:48:25:55 | __second | segfault.cpp:15:7:15:11 | tuple |

cpp/ql/test/library-tests/templates/CPP-202/template_args.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
| file://:0:0:0:0 | __va_list_tag | <none> |
2-
| test.cpp:3:8:3:9 | s1<<expression>> | <none> |
3-
| test.cpp:3:8:3:9 | s1<<unnamed>> | <none> |
2+
| test.cpp:3:8:3:9 | s1<<expression>> | bool |
3+
| test.cpp:3:8:3:9 | s1<<unnamed>> | bool |
44
| test.cpp:5:8:5:9 | s2<T> | T |
55
| test.cpp:5:8:5:9 | s2<T> | T |
66
| test.cpp:7:8:7:9 | s3<T, <unnamed>> | (unnamed) |

cpp/ql/test/library-tests/templates/CPP-204/element.expected

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
| file://:0:0:0:0 | |
22
| file://:0:0:0:0 | 0 |
33
| file://:0:0:0:0 | (global namespace) |
4+
| file://:0:0:0:0 | Unknown literal |
5+
| file://:0:0:0:0 | Unknown literal |
6+
| file://:0:0:0:0 | Unknown literal |
7+
| file://:0:0:0:0 | Unknown literal |
8+
| file://:0:0:0:0 | Unknown literal |
9+
| file://:0:0:0:0 | Unknown literal |
410
| file://:0:0:0:0 | __va_list_tag |
511
| file://:0:0:0:0 | __va_list_tag & |
612
| file://:0:0:0:0 | __va_list_tag && |

0 commit comments

Comments
 (0)