File tree 2 files changed +3
-1
lines changed
lib/semmle/code/cpp/controlflow
test/library-tests/controlflow/guards-ir
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,9 @@ private class GuardConditionFromIR extends GuardCondition {
223
223
or
224
224
instr = tce .getInstruction ( ConditionValueFalseTempAddressTag ( ) )
225
225
)
226
+ or
227
+ // Exclude unreached instructions, as their AST is the whole function and not a block.
228
+ instr instanceof UnreachedInstruction
226
229
}
227
230
}
228
231
Original file line number Diff line number Diff line change @@ -257,7 +257,6 @@ astGuardsControl
257
257
| test.c:175:13:175:32 | ... == ... | false | 175 | 175 |
258
258
| test.c:175:13:175:32 | ... == ... | true | 175 | 175 |
259
259
| test.c:181:9:181:9 | x | false | 183 | 184 |
260
- | test.c:181:9:181:9 | x | false | 186 | 180 |
261
260
| test.c:181:9:181:9 | x | true | 181 | 182 |
262
261
| test.c:181:9:181:9 | x | true | 186 | 180 |
263
262
| test.cpp:18:8:18:10 | call to get | true | 19 | 19 |
You can’t perform that action at this time.
0 commit comments