Skip to content

Commit bebf89f

Browse files
author
Dave Bartolomeo
committed
C++: Accept test diffs
All changes look like real improvements.
1 parent c5ac357 commit bebf89f

File tree

3 files changed

+19
-27
lines changed

3 files changed

+19
-27
lines changed

cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/diff_ir_expr.expected

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,12 @@
5252
| test.cpp:56:13:56:16 | (int)... | test.cpp:56:13:56:16 | (int)... | AST only |
5353
| test.cpp:56:13:56:16 | (int)... | test.cpp:56:31:56:34 | (int)... | AST only |
5454
| test.cpp:56:13:56:16 | (int)... | test.cpp:59:9:59:12 | (int)... | AST only |
55-
| test.cpp:56:13:56:16 | * ... | test.cpp:56:31:56:34 | * ... | AST only |
56-
| test.cpp:56:13:56:16 | * ... | test.cpp:59:9:59:12 | * ... | AST only |
5755
| test.cpp:56:21:56:24 | (int)... | test.cpp:53:10:53:13 | (int)... | AST only |
5856
| test.cpp:56:21:56:24 | (int)... | test.cpp:56:21:56:24 | (int)... | AST only |
5957
| test.cpp:56:30:56:43 | (...) | test.cpp:56:30:56:43 | (...) | AST only |
6058
| test.cpp:56:31:56:34 | (int)... | test.cpp:56:13:56:16 | (int)... | AST only |
6159
| test.cpp:56:31:56:34 | (int)... | test.cpp:56:31:56:34 | (int)... | AST only |
6260
| test.cpp:56:31:56:34 | (int)... | test.cpp:59:9:59:12 | (int)... | AST only |
63-
| test.cpp:56:31:56:34 | * ... | test.cpp:56:13:56:16 | * ... | AST only |
64-
| test.cpp:56:31:56:34 | * ... | test.cpp:59:9:59:12 | * ... | AST only |
6561
| test.cpp:56:39:56:42 | (int)... | test.cpp:44:9:44:9 | 0 | AST only |
6662
| test.cpp:56:39:56:42 | (int)... | test.cpp:51:25:51:25 | 0 | AST only |
6763
| test.cpp:56:39:56:42 | (int)... | test.cpp:53:18:53:21 | (int)... | AST only |
@@ -72,8 +68,6 @@
7268
| test.cpp:59:9:59:12 | (int)... | test.cpp:56:13:56:16 | (int)... | AST only |
7369
| test.cpp:59:9:59:12 | (int)... | test.cpp:56:31:56:34 | (int)... | AST only |
7470
| test.cpp:59:9:59:12 | (int)... | test.cpp:59:9:59:12 | (int)... | AST only |
75-
| test.cpp:59:9:59:12 | * ... | test.cpp:56:13:56:16 | * ... | AST only |
76-
| test.cpp:59:9:59:12 | * ... | test.cpp:56:31:56:34 | * ... | AST only |
7771
| test.cpp:59:17:59:20 | (int)... | test.cpp:44:9:44:9 | 0 | AST only |
7872
| test.cpp:59:17:59:20 | (int)... | test.cpp:51:25:51:25 | 0 | AST only |
7973
| test.cpp:59:17:59:20 | (int)... | test.cpp:53:18:53:21 | (int)... | AST only |
@@ -125,9 +119,7 @@
125119
| test.cpp:128:7:128:7 | x | test.cpp:126:15:126:15 | x | AST only |
126120
| test.cpp:128:11:128:11 | n | test.cpp:129:15:129:15 | x | IR only |
127121
| test.cpp:129:15:129:15 | x | test.cpp:128:11:128:11 | n | IR only |
128-
| test.cpp:136:21:136:21 | x | test.cpp:137:21:137:21 | x | AST only |
129122
| test.cpp:136:21:136:21 | x | test.cpp:139:13:139:13 | x | AST only |
130-
| test.cpp:137:21:137:21 | x | test.cpp:136:21:136:21 | x | AST only |
131123
| test.cpp:137:21:137:21 | x | test.cpp:139:13:139:13 | x | AST only |
132124
| test.cpp:139:3:139:24 | ... = ... | test.cpp:139:3:139:24 | ... = ... | AST only |
133125
| test.cpp:139:13:139:13 | x | test.cpp:136:21:136:21 | x | AST only |
@@ -137,6 +129,4 @@
137129
| test.cpp:147:3:147:18 | ... = ... | test.cpp:147:3:147:18 | ... = ... | AST only |
138130
| test.cpp:147:7:147:7 | y | test.cpp:145:15:145:15 | y | AST only |
139131
| test.cpp:149:15:149:15 | x | test.cpp:144:15:144:15 | x | IR only |
140-
| test.cpp:153:21:153:21 | x | test.cpp:154:21:154:21 | x | AST only |
141-
| test.cpp:154:21:154:21 | x | test.cpp:153:21:153:21 | x | AST only |
142132
| test.cpp:156:3:156:17 | ... = ... | test.cpp:156:3:156:17 | ... = ... | AST only |

cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/ir_gvn.expected

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ test.cpp:
355355
# 46| m46_4(int) = Store : &:r46_3, r46_2
356356
# 46| valnum = m43_10, m45_10, m46_4, r43_8, r45_8, r46_2
357357
# 47| v47_1(void) = NoOp :
358-
# 39| v39_14(void) = ReturnIndirection : &:r39_12, ~m44_6
358+
# 39| v39_14(void) = ReturnIndirection : &:r39_12, m44_6
359359
# 39| r39_15(glval<int>) = VariableAddress[#return] :
360360
# 39| valnum = unique
361361
# 39| v39_16(void) = ReturnValue : &:r39_15
@@ -440,9 +440,9 @@ test.cpp:
440440
# 56| r56_3(char *) = Load : &:r56_2, m56_1
441441
# 56| valnum = m56_1, r56_13, r56_20, r56_3, r59_2
442442
# 56| r56_4(char) = Load : &:r56_3, ~m49_4
443-
# 56| valnum = unique
443+
# 56| valnum = r56_14, r56_4, r59_3
444444
# 56| r56_5(int) = Convert : r56_4
445-
# 56| valnum = unique
445+
# 56| valnum = r56_15, r56_5, r59_4
446446
# 56| r56_6(glval<char *>) = VariableAddress[str] :
447447
# 56| valnum = r49_6, r53_2, r56_6
448448
# 56| r56_7(char *) = Load : &:r56_6, m49_7
@@ -463,9 +463,9 @@ test.cpp:
463463
# 56| r56_13(char *) = Load : &:r56_12, m56_1
464464
# 56| valnum = m56_1, r56_13, r56_20, r56_3, r59_2
465465
# 56| r56_14(char) = Load : &:r56_13, ~m49_4
466-
# 56| valnum = unique
466+
# 56| valnum = r56_14, r56_4, r59_3
467467
# 56| r56_15(int) = Convert : r56_14
468-
# 56| valnum = unique
468+
# 56| valnum = r56_15, r56_5, r59_4
469469
# 56| r56_16(int) = Constant[0] :
470470
# 56| valnum = r53_6, r56_16, r59_5
471471
# 56| r56_17(bool) = CompareNE : r56_15, r56_16
@@ -493,9 +493,9 @@ test.cpp:
493493
# 59| r59_2(char *) = Load : &:r59_1, m56_1
494494
# 59| valnum = m56_1, r56_13, r56_20, r56_3, r59_2
495495
# 59| r59_3(char) = Load : &:r59_2, ~m49_4
496-
# 59| valnum = unique
496+
# 59| valnum = r56_14, r56_4, r59_3
497497
# 59| r59_4(int) = Convert : r59_3
498-
# 59| valnum = unique
498+
# 59| valnum = r56_15, r56_5, r59_4
499499
# 59| r59_5(int) = Constant[0] :
500500
# 59| valnum = r53_6, r56_16, r59_5
501501
# 59| r59_6(bool) = CompareEQ : r59_4, r59_5
@@ -925,7 +925,7 @@ test.cpp:
925925
# 129| m129_6(int) = Store : &:r129_1, r129_5
926926
# 129| valnum = m124_11, m128_6, m129_6, r128_2, r129_5
927927
# 130| v130_1(void) = NoOp :
928-
# 124| v124_12(void) = ReturnIndirection : &:r124_8, ~m128_7
928+
# 124| v124_12(void) = ReturnIndirection : &:r124_8, m128_7
929929
# 124| v124_13(void) = ReturnVoid :
930930
# 124| v124_14(void) = UnmodeledUse : mu*
931931
# 124| v124_15(void) = AliasedUse : m124_3
@@ -951,9 +951,9 @@ test.cpp:
951951
# 136| r136_4(glval<int>) = FieldAddress[x] : r136_3
952952
# 136| valnum = r136_4, r137_4, r139_5
953953
# 136| r136_5(int) = Load : &:r136_4, ~m135_4
954-
# 136| valnum = m136_6, r136_5
954+
# 136| valnum = m136_6, m137_6, r136_5, r137_5
955955
# 136| m136_6(int) = Store : &:r136_1, r136_5
956-
# 136| valnum = m136_6, r136_5
956+
# 136| valnum = m136_6, m137_6, r136_5, r137_5
957957
# 137| r137_1(glval<int>) = VariableAddress[c] :
958958
# 137| valnum = unique
959959
# 137| r137_2(glval<A *>) = VariableAddress[global_a] :
@@ -963,9 +963,9 @@ test.cpp:
963963
# 137| r137_4(glval<int>) = FieldAddress[x] : r137_3
964964
# 137| valnum = r136_4, r137_4, r139_5
965965
# 137| r137_5(int) = Load : &:r137_4, ~m135_4
966-
# 137| valnum = m137_6, r137_5
966+
# 137| valnum = m136_6, m137_6, r136_5, r137_5
967967
# 137| m137_6(int) = Store : &:r137_1, r137_5
968-
# 137| valnum = m137_6, r137_5
968+
# 137| valnum = m136_6, m137_6, r136_5, r137_5
969969
# 139| r139_1(glval<int>) = VariableAddress[global_n] :
970970
# 139| valnum = unique
971971
# 139| r139_2(int) = Load : &:r139_1, ~m135_3
@@ -1068,7 +1068,7 @@ test.cpp:
10681068
# 149| m149_6(int) = Store : &:r149_1, r149_5
10691069
# 149| valnum = m144_6, m149_6, r144_5, r149_5
10701070
# 150| v150_1(void) = NoOp :
1071-
# 143| v143_10(void) = ReturnIndirection : &:r143_8, ~m147_7
1071+
# 143| v143_10(void) = ReturnIndirection : &:r143_8, m147_7
10721072
# 143| v143_11(void) = ReturnVoid :
10731073
# 143| v143_12(void) = UnmodeledUse : mu*
10741074
# 143| v143_13(void) = AliasedUse : m143_3
@@ -1098,9 +1098,9 @@ test.cpp:
10981098
# 153| r153_4(glval<int>) = FieldAddress[x] : r153_3
10991099
# 153| valnum = r153_4, r154_4
11001100
# 153| r153_5(int) = Load : &:r153_4, ~m152_4
1101-
# 153| valnum = m153_6, r153_5
1101+
# 153| valnum = m153_6, m154_6, r153_5, r154_5
11021102
# 153| m153_6(int) = Store : &:r153_1, r153_5
1103-
# 153| valnum = m153_6, r153_5
1103+
# 153| valnum = m153_6, m154_6, r153_5, r154_5
11041104
# 154| r154_1(glval<int>) = VariableAddress[c] :
11051105
# 154| valnum = unique
11061106
# 154| r154_2(glval<A *>) = VariableAddress[global_a] :
@@ -1110,9 +1110,9 @@ test.cpp:
11101110
# 154| r154_4(glval<int>) = FieldAddress[x] : r154_3
11111111
# 154| valnum = r153_4, r154_4
11121112
# 154| r154_5(int) = Load : &:r154_4, ~m152_4
1113-
# 154| valnum = m154_6, r154_5
1113+
# 154| valnum = m153_6, m154_6, r153_5, r154_5
11141114
# 154| m154_6(int) = Store : &:r154_1, r154_5
1115-
# 154| valnum = m154_6, r154_5
1115+
# 154| valnum = m153_6, m154_6, r153_5, r154_5
11161116
# 156| r156_1(glval<int>) = VariableAddress[n] :
11171117
# 156| valnum = r152_6, r156_1
11181118
# 156| r156_2(int) = Load : &:r156_1, m152_7

cpp/ql/test/query-tests/Likely Bugs/Memory Management/StrncpyFlippedArgs/StrncpyFlippedArgs.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@
1212
| test.cpp:46:2:46:9 | call to strcpy_s | Potentially unsafe call to strcpy_s; second argument should be size of destination. |
1313
| test.cpp:47:2:47:9 | call to strcpy_s | Potentially unsafe call to strcpy_s; second argument should be size of destination. |
1414
| test.cpp:60:3:60:9 | call to strncpy | Potentially unsafe call to strncpy; third argument should be size of destination. |
15+
| test.cpp:63:3:63:9 | call to strncpy | Potentially unsafe call to strncpy; third argument should be size of destination. |
1516
| test.cpp:68:2:68:8 | call to strncpy | Potentially unsafe call to strncpy; third argument should be size of destination. |
1617
| test.cpp:79:3:79:9 | call to strncpy | Potentially unsafe call to strncpy; third argument should be size of destination. |
18+
| test.cpp:82:3:82:9 | call to strncpy | Potentially unsafe call to strncpy; third argument should be size of destination. |

0 commit comments

Comments
 (0)