diff --git a/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/diff_ir_expr.expected b/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/diff_ir_expr.expected index cd44eb8572b..7322e9723ec 100644 --- a/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/diff_ir_expr.expected +++ b/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/diff_ir_expr.expected @@ -52,16 +52,12 @@ | test.cpp:56:13:56:16 | (int)... | test.cpp:56:13:56:16 | (int)... | AST only | | test.cpp:56:13:56:16 | (int)... | test.cpp:56:31:56:34 | (int)... | AST only | | test.cpp:56:13:56:16 | (int)... | test.cpp:59:9:59:12 | (int)... | AST only | -| test.cpp:56:13:56:16 | * ... | test.cpp:56:31:56:34 | * ... | AST only | -| test.cpp:56:13:56:16 | * ... | test.cpp:59:9:59:12 | * ... | AST only | | test.cpp:56:21:56:24 | (int)... | test.cpp:53:10:53:13 | (int)... | AST only | | test.cpp:56:21:56:24 | (int)... | test.cpp:56:21:56:24 | (int)... | AST only | | test.cpp:56:30:56:43 | (...) | test.cpp:56:30:56:43 | (...) | AST only | | test.cpp:56:31:56:34 | (int)... | test.cpp:56:13:56:16 | (int)... | AST only | | test.cpp:56:31:56:34 | (int)... | test.cpp:56:31:56:34 | (int)... | AST only | | test.cpp:56:31:56:34 | (int)... | test.cpp:59:9:59:12 | (int)... | AST only | -| test.cpp:56:31:56:34 | * ... | test.cpp:56:13:56:16 | * ... | AST only | -| test.cpp:56:31:56:34 | * ... | test.cpp:59:9:59:12 | * ... | AST only | | test.cpp:56:39:56:42 | (int)... | test.cpp:44:9:44:9 | 0 | AST only | | test.cpp:56:39:56:42 | (int)... | test.cpp:51:25:51:25 | 0 | AST only | | test.cpp:56:39:56:42 | (int)... | test.cpp:53:18:53:21 | (int)... | AST only | @@ -72,8 +68,6 @@ | test.cpp:59:9:59:12 | (int)... | test.cpp:56:13:56:16 | (int)... | AST only | | test.cpp:59:9:59:12 | (int)... | test.cpp:56:31:56:34 | (int)... | AST only | | test.cpp:59:9:59:12 | (int)... | test.cpp:59:9:59:12 | (int)... | AST only | -| test.cpp:59:9:59:12 | * ... | test.cpp:56:13:56:16 | * ... | AST only | -| test.cpp:59:9:59:12 | * ... | test.cpp:56:31:56:34 | * ... | AST only | | test.cpp:59:17:59:20 | (int)... | test.cpp:44:9:44:9 | 0 | AST only | | test.cpp:59:17:59:20 | (int)... | test.cpp:51:25:51:25 | 0 | AST only | | test.cpp:59:17:59:20 | (int)... | test.cpp:53:18:53:21 | (int)... | AST only | @@ -125,9 +119,7 @@ | test.cpp:128:7:128:7 | x | test.cpp:126:15:126:15 | x | AST only | | test.cpp:128:11:128:11 | n | test.cpp:129:15:129:15 | x | IR only | | test.cpp:129:15:129:15 | x | test.cpp:128:11:128:11 | n | IR only | -| test.cpp:136:21:136:21 | x | test.cpp:137:21:137:21 | x | AST only | | test.cpp:136:21:136:21 | x | test.cpp:139:13:139:13 | x | AST only | -| test.cpp:137:21:137:21 | x | test.cpp:136:21:136:21 | x | AST only | | test.cpp:137:21:137:21 | x | test.cpp:139:13:139:13 | x | AST only | | test.cpp:139:3:139:24 | ... = ... | test.cpp:139:3:139:24 | ... = ... | AST only | | test.cpp:139:13:139:13 | x | test.cpp:136:21:136:21 | x | AST only | @@ -137,6 +129,4 @@ | test.cpp:147:3:147:18 | ... = ... | test.cpp:147:3:147:18 | ... = ... | AST only | | test.cpp:147:7:147:7 | y | test.cpp:145:15:145:15 | y | AST only | | test.cpp:149:15:149:15 | x | test.cpp:144:15:144:15 | x | IR only | -| test.cpp:153:21:153:21 | x | test.cpp:154:21:154:21 | x | AST only | -| test.cpp:154:21:154:21 | x | test.cpp:153:21:153:21 | x | AST only | | test.cpp:156:3:156:17 | ... = ... | test.cpp:156:3:156:17 | ... = ... | AST only | diff --git a/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/ir_gvn.expected b/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/ir_gvn.expected index 10366d1f6bb..a492fb47d41 100644 --- a/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/ir_gvn.expected +++ b/cpp/ql/test/library-tests/valuenumbering/GlobalValueNumbering/ir_gvn.expected @@ -355,7 +355,7 @@ test.cpp: # 46| m46_4(int) = Store : &:r46_3, r46_2 # 46| valnum = m43_10, m45_10, m46_4, r43_8, r45_8, r46_2 # 47| v47_1(void) = NoOp : -# 39| v39_14(void) = ReturnIndirection : &:r39_12, ~m44_6 +# 39| v39_14(void) = ReturnIndirection : &:r39_12, m44_6 # 39| r39_15(glval) = VariableAddress[#return] : # 39| valnum = unique # 39| v39_16(void) = ReturnValue : &:r39_15 @@ -440,9 +440,9 @@ test.cpp: # 56| r56_3(char *) = Load : &:r56_2, m56_1 # 56| valnum = m56_1, r56_13, r56_20, r56_3, r59_2 # 56| r56_4(char) = Load : &:r56_3, ~m49_4 -# 56| valnum = unique +# 56| valnum = r56_14, r56_4, r59_3 # 56| r56_5(int) = Convert : r56_4 -# 56| valnum = unique +# 56| valnum = r56_15, r56_5, r59_4 # 56| r56_6(glval) = VariableAddress[str] : # 56| valnum = r49_6, r53_2, r56_6 # 56| r56_7(char *) = Load : &:r56_6, m49_7 @@ -463,9 +463,9 @@ test.cpp: # 56| r56_13(char *) = Load : &:r56_12, m56_1 # 56| valnum = m56_1, r56_13, r56_20, r56_3, r59_2 # 56| r56_14(char) = Load : &:r56_13, ~m49_4 -# 56| valnum = unique +# 56| valnum = r56_14, r56_4, r59_3 # 56| r56_15(int) = Convert : r56_14 -# 56| valnum = unique +# 56| valnum = r56_15, r56_5, r59_4 # 56| r56_16(int) = Constant[0] : # 56| valnum = r53_6, r56_16, r59_5 # 56| r56_17(bool) = CompareNE : r56_15, r56_16 @@ -493,9 +493,9 @@ test.cpp: # 59| r59_2(char *) = Load : &:r59_1, m56_1 # 59| valnum = m56_1, r56_13, r56_20, r56_3, r59_2 # 59| r59_3(char) = Load : &:r59_2, ~m49_4 -# 59| valnum = unique +# 59| valnum = r56_14, r56_4, r59_3 # 59| r59_4(int) = Convert : r59_3 -# 59| valnum = unique +# 59| valnum = r56_15, r56_5, r59_4 # 59| r59_5(int) = Constant[0] : # 59| valnum = r53_6, r56_16, r59_5 # 59| r59_6(bool) = CompareEQ : r59_4, r59_5 @@ -925,7 +925,7 @@ test.cpp: # 129| m129_6(int) = Store : &:r129_1, r129_5 # 129| valnum = m124_11, m128_6, m129_6, r128_2, r129_5 # 130| v130_1(void) = NoOp : -# 124| v124_12(void) = ReturnIndirection : &:r124_8, ~m128_7 +# 124| v124_12(void) = ReturnIndirection : &:r124_8, m128_7 # 124| v124_13(void) = ReturnVoid : # 124| v124_14(void) = UnmodeledUse : mu* # 124| v124_15(void) = AliasedUse : m124_3 @@ -951,9 +951,9 @@ test.cpp: # 136| r136_4(glval) = FieldAddress[x] : r136_3 # 136| valnum = r136_4, r137_4, r139_5 # 136| r136_5(int) = Load : &:r136_4, ~m135_4 -# 136| valnum = m136_6, r136_5 +# 136| valnum = m136_6, m137_6, r136_5, r137_5 # 136| m136_6(int) = Store : &:r136_1, r136_5 -# 136| valnum = m136_6, r136_5 +# 136| valnum = m136_6, m137_6, r136_5, r137_5 # 137| r137_1(glval) = VariableAddress[c] : # 137| valnum = unique # 137| r137_2(glval) = VariableAddress[global_a] : @@ -963,9 +963,9 @@ test.cpp: # 137| r137_4(glval) = FieldAddress[x] : r137_3 # 137| valnum = r136_4, r137_4, r139_5 # 137| r137_5(int) = Load : &:r137_4, ~m135_4 -# 137| valnum = m137_6, r137_5 +# 137| valnum = m136_6, m137_6, r136_5, r137_5 # 137| m137_6(int) = Store : &:r137_1, r137_5 -# 137| valnum = m137_6, r137_5 +# 137| valnum = m136_6, m137_6, r136_5, r137_5 # 139| r139_1(glval) = VariableAddress[global_n] : # 139| valnum = unique # 139| r139_2(int) = Load : &:r139_1, ~m135_3 @@ -1068,7 +1068,7 @@ test.cpp: # 149| m149_6(int) = Store : &:r149_1, r149_5 # 149| valnum = m144_6, m149_6, r144_5, r149_5 # 150| v150_1(void) = NoOp : -# 143| v143_10(void) = ReturnIndirection : &:r143_8, ~m147_7 +# 143| v143_10(void) = ReturnIndirection : &:r143_8, m147_7 # 143| v143_11(void) = ReturnVoid : # 143| v143_12(void) = UnmodeledUse : mu* # 143| v143_13(void) = AliasedUse : m143_3 @@ -1098,9 +1098,9 @@ test.cpp: # 153| r153_4(glval) = FieldAddress[x] : r153_3 # 153| valnum = r153_4, r154_4 # 153| r153_5(int) = Load : &:r153_4, ~m152_4 -# 153| valnum = m153_6, r153_5 +# 153| valnum = m153_6, m154_6, r153_5, r154_5 # 153| m153_6(int) = Store : &:r153_1, r153_5 -# 153| valnum = m153_6, r153_5 +# 153| valnum = m153_6, m154_6, r153_5, r154_5 # 154| r154_1(glval) = VariableAddress[c] : # 154| valnum = unique # 154| r154_2(glval) = VariableAddress[global_a] : @@ -1110,9 +1110,9 @@ test.cpp: # 154| r154_4(glval) = FieldAddress[x] : r154_3 # 154| valnum = r153_4, r154_4 # 154| r154_5(int) = Load : &:r154_4, ~m152_4 -# 154| valnum = m154_6, r154_5 +# 154| valnum = m153_6, m154_6, r153_5, r154_5 # 154| m154_6(int) = Store : &:r154_1, r154_5 -# 154| valnum = m154_6, r154_5 +# 154| valnum = m153_6, m154_6, r153_5, r154_5 # 156| r156_1(glval) = VariableAddress[n] : # 156| valnum = r152_6, r156_1 # 156| r156_2(int) = Load : &:r156_1, m152_7 diff --git a/cpp/ql/test/query-tests/Likely Bugs/Memory Management/StrncpyFlippedArgs/StrncpyFlippedArgs.expected b/cpp/ql/test/query-tests/Likely Bugs/Memory Management/StrncpyFlippedArgs/StrncpyFlippedArgs.expected index 0fe37d1fe05..88a953b0196 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Memory Management/StrncpyFlippedArgs/StrncpyFlippedArgs.expected +++ b/cpp/ql/test/query-tests/Likely Bugs/Memory Management/StrncpyFlippedArgs/StrncpyFlippedArgs.expected @@ -12,5 +12,7 @@ | test.cpp:46:2:46:9 | call to strcpy_s | Potentially unsafe call to strcpy_s; second argument should be size of destination. | | test.cpp:47:2:47:9 | call to strcpy_s | Potentially unsafe call to strcpy_s; second argument should be size of destination. | | test.cpp:60:3:60:9 | call to strncpy | Potentially unsafe call to strncpy; third argument should be size of destination. | +| test.cpp:63:3:63:9 | call to strncpy | Potentially unsafe call to strncpy; third argument should be size of destination. | | test.cpp:68:2:68:8 | call to strncpy | Potentially unsafe call to strncpy; third argument should be size of destination. | | test.cpp:79:3:79:9 | call to strncpy | Potentially unsafe call to strncpy; third argument should be size of destination. | +| test.cpp:82:3:82:9 | call to strncpy | Potentially unsafe call to strncpy; third argument should be size of destination. |