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.
hasBranchEdge
1 parent 398678a commit cade3a3Copy full SHA for cade3a3
cpp/ql/src/semmle/code/cpp/controlflow/IRGuards.qll
@@ -407,11 +407,7 @@ class IRGuardCondition extends Instruction {
407
not isUnreachedBlock(controlled) and
408
exists(IRBlock branchBlock | branchBlock.getAnInstruction() = branch |
409
exists(IRBlock succ |
410
- testIsTrue = true and succ.getFirstInstruction() = branch.getTrueSuccessor()
411
- or
412
- testIsTrue = false and succ.getFirstInstruction() = branch.getFalseSuccessor()
413
- |
414
- branch.getCondition() = this and
+ this.hasBranchEdge(succ, testIsTrue) and
415
succ.dominates(controlled) and
416
forall(IRBlock pred | pred.getASuccessor() = succ |
417
pred = branchBlock or succ.dominates(pred) or not pred.isReachableFromFunctionEntry()
0 commit comments