We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad401e9 commit 17737cdCopy full SHA for 17737cd
cpp/ql/src/semmle/code/cpp/controlflow/IRGuards.qll
@@ -466,6 +466,12 @@ class IRGuardCondition extends Instruction {
466
branchBlock.getASuccessor() = succ and
467
forall(IRBlock pred | pred = succ.getAPredecessor() and pred != branchBlock |
468
succ.dominates(pred)
469
+ or
470
+ // An unreachable `pred` is vacuously dominated by `succ` since all
471
+ // paths from the entry to `pred` go through `succ`. Such vacuous
472
+ // dominance is not included in the `dominates` predicate since that
473
+ // could cause quadratic blow-up.
474
+ not pred.isReachableFromFunctionEntry()
475
)
476
477
}
0 commit comments