Skip to content

Commit ae81ce4

Browse files
committed
C++: Update expected test results after frontend update
1 parent 8b89e15 commit ae81ce4

File tree

9 files changed

+59
-52
lines changed

9 files changed

+59
-52
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
#-----| <params>:
77
#-----| getParameter(0): [Parameter] (unnamed parameter 0)
88
#-----| Type = [RValueReferenceType] __va_list_tag &&
9+
#-----| [CopyAssignmentOperator] std::__va_list& std::__va_list::operator=(std::__va_list const&)
10+
#-----| <params>:
11+
#-----| getParameter(0): [Parameter] (unnamed parameter 0)
12+
#-----| Type = [LValueReferenceType] const __va_list &
13+
#-----| [MoveAssignmentOperator] std::__va_list& std::__va_list::operator=(std::__va_list&&)
14+
#-----| <params>:
15+
#-----| getParameter(0): [Parameter] (unnamed parameter 0)
16+
#-----| Type = [RValueReferenceType] __va_list &&
917
#-----| [Operator,TopLevelFunction] void operator delete(void*)
1018
#-----| <params>:
1119
#-----| getParameter(0): [Parameter] (unnamed parameter 0)

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9648,29 +9648,29 @@ ir.cpp:
96489648
# 1054| r1054_1(glval<decltype([...](...){...})>) = VariableAddress[lambda_inits] :
96499649
# 1054| r1054_2(glval<decltype([...](...){...})>) = VariableAddress[#temp1054:22] :
96509650
# 1054| m1054_3(decltype([...](...){...})) = Uninitialized[#temp1054:22] : &:r1054_2
9651-
# 1054| r1054_4(glval<String &>) = FieldAddress[s] : r1054_2
9652-
# 1054| r1054_5(glval<String &>) = VariableAddress[s] :
9653-
# 1054| r1054_6(String &) = Load[s] : &:r1054_5, m1040_9
9654-
# 1054| r1054_7(glval<String>) = CopyValue : r1054_6
9655-
# 1054| r1054_8(String &) = CopyValue : r1054_7
9656-
# 1054| m1054_9(String &) = Store[?] : &:r1054_4, r1054_8
9651+
# 1054| r1054_4(glval<int>) = FieldAddress[i] : r1054_2
9652+
# 1054| r1054_5(glval<int>) = VariableAddress[x] :
9653+
# 1054| r1054_6(int) = Load[x] : &:r1054_5, ~m1052_7
9654+
# 1054| r1054_7(int) = Constant[1] :
9655+
# 1054| r1054_8(int) = Add : r1054_6, r1054_7
9656+
# 1054| m1054_9(int) = Store[?] : &:r1054_4, r1054_8
96579657
# 1054| m1054_10(decltype([...](...){...})) = Chi : total:m1054_3, partial:m1054_9
9658-
# 1054| r1054_11(glval<int>) = FieldAddress[x] : r1054_2
9659-
# 1054| r1054_12(glval<int>) = VariableAddress[x] :
9660-
# 1054| r1054_13(int) = Load[x] : &:r1054_12, ~m1052_7
9661-
# 1054| m1054_14(int) = Store[?] : &:r1054_11, r1054_13
9658+
# 1054| r1054_11(glval<int &>) = FieldAddress[j] : r1054_2
9659+
# 1054| r1054_12(glval<int>) = VariableAddress[r] :
9660+
# 1054| r1054_13(int &) = CopyValue : r1054_12
9661+
# 1054| m1054_14(int &) = Store[?] : &:r1054_11, r1054_13
96629662
# 1054| m1054_15(decltype([...](...){...})) = Chi : total:m1054_10, partial:m1054_14
9663-
# 1054| r1054_16(glval<int>) = FieldAddress[i] : r1054_2
9664-
# 1054| r1054_17(glval<int>) = VariableAddress[x] :
9665-
# 1054| r1054_18(int) = Load[x] : &:r1054_17, ~m1052_7
9666-
# 1054| r1054_19(int) = Constant[1] :
9667-
# 1054| r1054_20(int) = Add : r1054_18, r1054_19
9668-
# 1054| m1054_21(int) = Store[?] : &:r1054_16, r1054_20
9663+
# 1054| r1054_16(glval<String &>) = FieldAddress[s] : r1054_2
9664+
# 1054| r1054_17(glval<String &>) = VariableAddress[s] :
9665+
# 1054| r1054_18(String &) = Load[s] : &:r1054_17, m1040_9
9666+
# 1054| r1054_19(glval<String>) = CopyValue : r1054_18
9667+
# 1054| r1054_20(String &) = CopyValue : r1054_19
9668+
# 1054| m1054_21(String &) = Store[?] : &:r1054_16, r1054_20
96699669
# 1054| m1054_22(decltype([...](...){...})) = Chi : total:m1054_15, partial:m1054_21
9670-
# 1054| r1054_23(glval<int &>) = FieldAddress[j] : r1054_2
9671-
# 1054| r1054_24(glval<int>) = VariableAddress[r] :
9672-
# 1054| r1054_25(int &) = CopyValue : r1054_24
9673-
# 1054| m1054_26(int &) = Store[?] : &:r1054_23, r1054_25
9670+
# 1054| r1054_23(glval<int>) = FieldAddress[x] : r1054_2
9671+
# 1054| r1054_24(glval<int>) = VariableAddress[x] :
9672+
# 1054| r1054_25(int) = Load[x] : &:r1054_24, ~m1052_7
9673+
# 1054| m1054_26(int) = Store[?] : &:r1054_23, r1054_25
96749674
# 1054| m1054_27(decltype([...](...){...})) = Chi : total:m1054_22, partial:m1054_26
96759675
# 1054| r1054_28(decltype([...](...){...})) = Load[#temp1054:22] : &:r1054_2, m1054_27
96769676
# 1054| m1054_29(decltype([...](...){...})) = Store[lambda_inits] : &:r1054_1, r1054_28

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8892,26 +8892,26 @@ ir.cpp:
88928892
# 1054| r1054_1(glval<decltype([...](...){...})>) = VariableAddress[lambda_inits] :
88938893
# 1054| r1054_2(glval<decltype([...](...){...})>) = VariableAddress[#temp1054:22] :
88948894
# 1054| mu1054_3(decltype([...](...){...})) = Uninitialized[#temp1054:22] : &:r1054_2
8895-
# 1054| r1054_4(glval<String &>) = FieldAddress[s] : r1054_2
8896-
# 1054| r1054_5(glval<String &>) = VariableAddress[s] :
8897-
# 1054| r1054_6(String &) = Load[s] : &:r1054_5, ~m?
8898-
# 1054| r1054_7(glval<String>) = CopyValue : r1054_6
8899-
# 1054| r1054_8(String &) = CopyValue : r1054_7
8900-
# 1054| mu1054_9(String &) = Store[?] : &:r1054_4, r1054_8
8901-
# 1054| r1054_10(glval<int>) = FieldAddress[x] : r1054_2
8902-
# 1054| r1054_11(glval<int>) = VariableAddress[x] :
8903-
# 1054| r1054_12(int) = Load[x] : &:r1054_11, ~m?
8904-
# 1054| mu1054_13(int) = Store[?] : &:r1054_10, r1054_12
8905-
# 1054| r1054_14(glval<int>) = FieldAddress[i] : r1054_2
8906-
# 1054| r1054_15(glval<int>) = VariableAddress[x] :
8907-
# 1054| r1054_16(int) = Load[x] : &:r1054_15, ~m?
8908-
# 1054| r1054_17(int) = Constant[1] :
8909-
# 1054| r1054_18(int) = Add : r1054_16, r1054_17
8910-
# 1054| mu1054_19(int) = Store[?] : &:r1054_14, r1054_18
8911-
# 1054| r1054_20(glval<int &>) = FieldAddress[j] : r1054_2
8912-
# 1054| r1054_21(glval<int>) = VariableAddress[r] :
8913-
# 1054| r1054_22(int &) = CopyValue : r1054_21
8914-
# 1054| mu1054_23(int &) = Store[?] : &:r1054_20, r1054_22
8895+
# 1054| r1054_4(glval<int>) = FieldAddress[i] : r1054_2
8896+
# 1054| r1054_5(glval<int>) = VariableAddress[x] :
8897+
# 1054| r1054_6(int) = Load[x] : &:r1054_5, ~m?
8898+
# 1054| r1054_7(int) = Constant[1] :
8899+
# 1054| r1054_8(int) = Add : r1054_6, r1054_7
8900+
# 1054| mu1054_9(int) = Store[?] : &:r1054_4, r1054_8
8901+
# 1054| r1054_10(glval<int &>) = FieldAddress[j] : r1054_2
8902+
# 1054| r1054_11(glval<int>) = VariableAddress[r] :
8903+
# 1054| r1054_12(int &) = CopyValue : r1054_11
8904+
# 1054| mu1054_13(int &) = Store[?] : &:r1054_10, r1054_12
8905+
# 1054| r1054_14(glval<String &>) = FieldAddress[s] : r1054_2
8906+
# 1054| r1054_15(glval<String &>) = VariableAddress[s] :
8907+
# 1054| r1054_16(String &) = Load[s] : &:r1054_15, ~m?
8908+
# 1054| r1054_17(glval<String>) = CopyValue : r1054_16
8909+
# 1054| r1054_18(String &) = CopyValue : r1054_17
8910+
# 1054| mu1054_19(String &) = Store[?] : &:r1054_14, r1054_18
8911+
# 1054| r1054_20(glval<int>) = FieldAddress[x] : r1054_2
8912+
# 1054| r1054_21(glval<int>) = VariableAddress[x] :
8913+
# 1054| r1054_22(int) = Load[x] : &:r1054_21, ~m?
8914+
# 1054| mu1054_23(int) = Store[?] : &:r1054_20, r1054_22
89158915
# 1054| r1054_24(decltype([...](...){...})) = Load[#temp1054:22] : &:r1054_2, ~m?
89168916
# 1054| mu1054_25(decltype([...](...){...})) = Store[lambda_inits] : &:r1054_1, r1054_24
89178917
# 1055| r1055_1(glval<decltype([...](...){...})>) = VariableAddress[lambda_inits] :

cpp/ql/test/library-tests/scopes/parents/parents.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
| 0 | file://:0:0:0:0 | (global namespace) | file://:0:0:0:0 | __va_list_tag |
22
| 0 | file://:0:0:0:0 | (global namespace) | parents.cpp:2:11:2:13 | foo |
33
| 0 | file://:0:0:0:0 | (global namespace) | parents.cpp:18:3:18:3 | var |
4-
| 0 | file://:0:0:0:0 | (global namespace) | parents.cpp:18:7:18:7 | var |
4+
| 0 | file://:0:0:0:0 | (global namespace) | parents.cpp:18:3:18:5 | var |
55
| 0 | file://:0:0:0:0 | (global namespace) | parents.cpp:20:5:20:5 | g |
66
| 1 | file://:0:0:0:0 | __va_list_tag | file://:0:0:0:0 | fp_offset |
77
| 1 | file://:0:0:0:0 | __va_list_tag | file://:0:0:0:0 | gp_offset |
@@ -22,6 +22,6 @@
2222
| 1 | parents.cpp:6:11:10:7 | { ... } | parents.cpp:7:9:9:9 | for(...;...;...) ... |
2323
| 1 | parents.cpp:6:11:10:7 | { ... } | parents.cpp:7:33:9:9 | { ... } |
2424
| 1 | parents.cpp:7:33:9:9 | { ... } | parents.cpp:8:15:8:15 | k |
25-
| 1 | parents.cpp:18:7:18:7 | var | parents.cpp:17:19:17:19 | T |
25+
| 1 | parents.cpp:18:3:18:5 | var | parents.cpp:17:19:17:19 | T |
2626
| 1 | parents.cpp:20:5:20:5 | g | parents.cpp:20:9:24:1 | { ... } |
2727
| 1 | parents.cpp:20:9:24:1 | { ... } | parents.cpp:21:16:21:16 | l |

cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromuninstantiatedtemplate.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ isFromUninstantiatedTemplate
121121
| isfromtemplateinstantiation.cpp:99:1:99:1 | return ... | isfromtemplateinstantiation.cpp:77:26:77:45 | AnotherTemplateClass<T> |
122122
| isfromtemplateinstantiation.cpp:99:1:99:1 | return ... | isfromtemplateinstantiation.cpp:97:25:97:60 | myMethod2 |
123123
| isfromtemplateinstantiation.cpp:99:1:99:1 | return ... | isfromtemplateinstantiation.cpp:97:52:97:52 | myMethod2 |
124-
| isfromtemplateinstantiation.cpp:110:15:110:15 | definition of var_template | isfromtemplateinstantiation.cpp:110:15:110:15 | var_template |
125-
| isfromtemplateinstantiation.cpp:110:15:110:15 | var_template | isfromtemplateinstantiation.cpp:110:15:110:15 | var_template |
124+
| isfromtemplateinstantiation.cpp:110:3:110:14 | definition of var_template | isfromtemplateinstantiation.cpp:110:3:110:14 | var_template |
125+
| isfromtemplateinstantiation.cpp:110:3:110:14 | var_template | isfromtemplateinstantiation.cpp:110:3:110:14 | var_template |
126126
| isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass<T *> | isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass<T *> |
127127
| isfromtemplateinstantiation.cpp:128:7:128:30 | definition of AnotherTemplateClass<T *> | isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass<T *> |
128128
| isfromtemplateinstantiation.cpp:129:6:129:6 | definition of f | isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass<T *> |

cpp/ql/test/library-tests/templates/variables/template_variables.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99
| variables.cpp:2:13:2:13 | pi | variables.cpp:25:12:25:16 | T | |
1010
| variables.cpp:2:13:2:13 | pi | variables.cpp:25:12:25:16, variables.cpp:37:16:37:24 | float | |
1111
| variables.cpp:2:13:2:13 | pi | variables.cpp:25:12:25:16, variables.cpp:38:16:38:22 | int | |
12-
| variables.cpp:2:16:2:16 | pi | | T | TemplateVariable |
12+
| variables.cpp:2:13:2:14 | pi | | T | TemplateVariable |
1313
| variables.cpp:5:23:5:37 | pi | | const char * | |
1414
| variables.cpp:8:13:8:13 | multi_arg | variables.cpp:33:19:33:33 | S, T | |
1515
| variables.cpp:8:13:8:13 | multi_arg | variables.cpp:33:19:33:33 | float, char | |
1616
| variables.cpp:8:13:8:13 | multi_arg | variables.cpp:33:19:33:33 | short, long | |
1717
| variables.cpp:8:13:8:13 | multi_arg | variables.cpp:40:23:40:60 | unsigned int, unsigned char | |
1818
| variables.cpp:8:13:8:13 | multi_arg | variables.cpp:41:23:41:42 | int, char | |
19-
| variables.cpp:8:23:8:23 | multi_arg | | S, T | TemplateVariable |
19+
| variables.cpp:8:13:8:21 | multi_arg | | S, T | TemplateVariable |
2020
| variables.cpp:11:3:11:3 | mutable_val | variables.cpp:26:3:26:16 | T | |
2121
| variables.cpp:11:3:11:3 | mutable_val | variables.cpp:26:3:26:16 | float | |
2222
| variables.cpp:11:3:11:3 | mutable_val | variables.cpp:26:3:26:16, variables.cpp:43:3:43:18 | int | |
2323
| variables.cpp:11:3:11:3 | mutable_val | variables.cpp:44:3:44:19 | long | |
24-
| variables.cpp:11:15:11:15 | mutable_val | | T | TemplateVariable |
24+
| variables.cpp:11:3:11:13 | mutable_val | | T | TemplateVariable |
2525
| variables.cpp:19:3:19:10 | bar | | T | TemplateVariable |
2626
| variables.cpp:19:8:19:8 | bar | variables.cpp:27:3:27:13 | T | |
2727
| variables.cpp:19:8:19:8 | bar | variables.cpp:27:3:27:13 | float | |

cpp/ql/test/query-tests/Best Practices/SloppyGlobal/SloppyGlobal.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
| main.cpp:4:5:4:6 | ys | Poor global variable name 'ys'. Prefer longer, descriptive names for globals (eg. kMyGlobalConstant, not foo). |
33
| main.cpp:9:5:9:6 | v1 | Poor global variable name 'v1'. Prefer longer, descriptive names for globals (eg. kMyGlobalConstant, not foo). |
44
| main.cpp:10:5:10:6 | v2 | Poor global variable name 'v2'. Prefer longer, descriptive names for globals (eg. kMyGlobalConstant, not foo). |
5-
| main.cpp:12:5:12:5 | v3 | Poor global variable name 'v3'. Prefer longer, descriptive names for globals (eg. kMyGlobalConstant, not foo). |
6-
| main.cpp:14:5:14:5 | v4 | Poor global variable name 'v4'. Prefer longer, descriptive names for globals (eg. kMyGlobalConstant, not foo). |
7-
| main.cpp:16:5:16:5 | v5 | Poor global variable name 'v5'. Prefer longer, descriptive names for globals (eg. kMyGlobalConstant, not foo). |
5+
| main.cpp:12:3:12:4 | v3 | Poor global variable name 'v3'. Prefer longer, descriptive names for globals (eg. kMyGlobalConstant, not foo). |
6+
| main.cpp:14:3:14:4 | v4 | Poor global variable name 'v4'. Prefer longer, descriptive names for globals (eg. kMyGlobalConstant, not foo). |
7+
| main.cpp:16:3:16:4 | v5 | Poor global variable name 'v5'. Prefer longer, descriptive names for globals (eg. kMyGlobalConstant, not foo). |

cpp/ql/test/query-tests/Best Practices/Unused Entities/UnusedLocals/UnusedLocals.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
| code2.cpp:7:6:7:7 | v3 | Variable v3 is not used. |
33
| code2.cpp:11:16:11:17 | v7 | Variable v7 is not used. |
44
| code2.cpp:26:16:26:17 | v1 | Variable v1 is not used. |
5-
| code2.cpp:27:16:27:17 | v2 | Variable v2 is not used. |
65
| code2.cpp:42:11:42:16 | myVar1 | Variable myVar1 is not used. |
76
| code2.cpp:64:7:64:8 | v3 | Variable v3 is not used. |
87
| code2.cpp:108:11:108:12 | v2 | Variable v2 is not used. |

cpp/ql/test/query-tests/Best Practices/Unused Entities/UnusedLocals/code2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void myFunction()
2424
void test_template_parameter()
2525
{
2626
constexpr int v1 = 0; // BAD: unused
27-
constexpr int v2 = 0; // GOOD: used as a template parameter below [FALSE POSITIVE]
27+
constexpr int v2 = 0; // GOOD: used as a template parameter below
2828

2929
myFunction<v2>();
3030
}

0 commit comments

Comments
 (0)