diff --git a/cpp/ql/test/library-tests/controlflow/guards-ir/tests.expected b/cpp/ql/test/library-tests/controlflow/guards-ir/tests.expected index d50ca16091636..6cf7d2b6a9584 100644 --- a/cpp/ql/test/library-tests/controlflow/guards-ir/tests.expected +++ b/cpp/ql/test/library-tests/controlflow/guards-ir/tests.expected @@ -160,6 +160,9 @@ astGuardsCompare | 137 | 0 == 0 when 0 is false | | 146 | ! ... != 0 when ! ... is true | | 146 | ! ... == 0 when ! ... is false | +| 146 | x != 0 when ! ... is false | +| 146 | x != 0 when x is true | +| 146 | x == 0 when x is false | | 152 | x != 0 when ... && ... is true | | 152 | x != 0 when x is true | | 152 | x == 0 when x is false | @@ -518,6 +521,7 @@ astGuardsEnsure_const | test.c:131:7:131:7 | b | test.c:131:7:131:7 | b | != | 0 | 131 | 132 | | test.c:137:7:137:7 | 0 | test.c:137:7:137:7 | 0 | == | 0 | 142 | 136 | | test.c:146:7:146:8 | ! ... | test.c:146:7:146:8 | ! ... | != | 0 | 146 | 147 | +| test.c:146:8:146:8 | x | test.c:146:8:146:8 | x | == | 0 | 146 | 147 | | test.c:152:10:152:10 | x | test.c:152:10:152:10 | x | != | 0 | 151 | 152 | | test.c:152:10:152:10 | x | test.c:152:10:152:10 | x | != | 0 | 152 | 152 | | test.c:152:10:152:15 | ... && ... | test.c:152:10:152:10 | x | != | 0 | 151 | 152 | @@ -689,6 +693,9 @@ irGuardsCompare | 137 | 0 == 0 when Constant: 0 is false | | 146 | ! ... != 0 when LogicalNot: ! ... is true | | 146 | ! ... == 0 when LogicalNot: ! ... is false | +| 146 | x != 0 when Load: x is true | +| 146 | x != 0 when LogicalNot: ! ... is false | +| 146 | x == 0 when Load: x is false | | 152 | x != 0 when Load: x is true | | 152 | x == 0 when Load: x is false | | 152 | y != 0 when Load: y is true | @@ -1063,6 +1070,7 @@ irGuardsEnsure_const | test.c:131:7:131:7 | Load: b | test.c:131:7:131:7 | Load: b | != | 0 | 132 | 132 | | test.c:137:7:137:7 | Constant: 0 | test.c:137:7:137:7 | Constant: 0 | == | 0 | 142 | 142 | | test.c:146:7:146:8 | LogicalNot: ! ... | test.c:146:7:146:8 | LogicalNot: ! ... | != | 0 | 147 | 147 | +| test.c:146:8:146:8 | Load: x | test.c:146:8:146:8 | Load: x | == | 0 | 147 | 147 | | test.c:152:10:152:10 | Load: x | test.c:152:10:152:10 | Load: x | != | 0 | 152 | 152 | | test.c:152:15:152:15 | Load: y | test.c:152:15:152:15 | Load: y | != | 0 | 152 | 152 | | test.c:175:13:175:32 | CompareEQ: ... == ... | test.c:175:13:175:15 | Call: call to foo | != | 0 | 175 | 175 | diff --git a/cpp/ql/test/library-tests/controlflow/guards/GuardsCompare.expected b/cpp/ql/test/library-tests/controlflow/guards/GuardsCompare.expected index a2f418b3d7bbe..3d32ada5f301a 100644 --- a/cpp/ql/test/library-tests/controlflow/guards/GuardsCompare.expected +++ b/cpp/ql/test/library-tests/controlflow/guards/GuardsCompare.expected @@ -161,11 +161,20 @@ | 137 | 0 == 0 when 0 is false | | 146 | ! ... != 0 when ! ... is true | | 146 | ! ... == 0 when ! ... is false | +| 146 | x != 0 when ! ... is false | +| 146 | x != 0 when x is true | +| 146 | x == 0 when x is false | | 152 | p != 0 when p is true | | 152 | p == 0 when p is false | | 158 | ! ... != 0 when ! ... is true | | 158 | ! ... == 0 when ! ... is false | +| 158 | p != 0 when ! ... is false | +| 158 | p != 0 when p is true | +| 158 | p == 0 when p is false | | 164 | s != 0 when s is true | | 164 | s == 0 when s is false | | 170 | ! ... != 0 when ! ... is true | | 170 | ! ... == 0 when ! ... is false | +| 170 | s != 0 when ! ... is false | +| 170 | s != 0 when s is true | +| 170 | s == 0 when s is false | diff --git a/cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected b/cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected index 45d63f6dd5368..84c416445aef6 100644 --- a/cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected +++ b/cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected @@ -245,10 +245,13 @@ unary | test.c:131:7:131:7 | b | test.c:131:7:131:7 | b | != | 0 | 131 | 132 | | test.c:137:7:137:7 | 0 | test.c:137:7:137:7 | 0 | == | 0 | 142 | 136 | | test.c:146:7:146:8 | ! ... | test.c:146:7:146:8 | ! ... | != | 0 | 146 | 147 | +| test.c:146:8:146:8 | x | test.c:146:8:146:8 | x | == | 0 | 146 | 147 | | test.c:152:8:152:8 | p | test.c:152:8:152:8 | p | != | 0 | 152 | 154 | | test.c:158:8:158:9 | ! ... | test.c:158:8:158:9 | ! ... | != | 0 | 158 | 160 | +| test.c:158:9:158:9 | p | test.c:158:9:158:9 | p | == | 0 | 158 | 160 | | test.c:164:8:164:8 | s | test.c:164:8:164:8 | s | != | 0 | 164 | 166 | | test.c:170:8:170:9 | ! ... | test.c:170:8:170:9 | ! ... | != | 0 | 170 | 172 | +| test.c:170:9:170:9 | s | test.c:170:9:170:9 | s | == | 0 | 170 | 172 | | test.cpp:18:8:18:10 | call to get | test.cpp:18:8:18:10 | call to get | != | 0 | 19 | 19 | | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:7 | x | != | -1 | 30 | 30 | | test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:7 | x | != | -1 | 34 | 34 |