mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Merge pull request #1116 from rdmarsh2/rdmarsh/cpp/ir-guards-perf
C++: fix cartesian product in IRGuards.qll
This commit is contained in:
@@ -381,9 +381,7 @@ cached class IRGuardCondition extends Instruction {
|
||||
}
|
||||
|
||||
private ConditionalBranchInstruction get_branch_for_condition(Instruction guard) {
|
||||
exists(ConditionalBranchInstruction branch|
|
||||
branch.getCondition() = guard
|
||||
)
|
||||
result.getCondition() = guard
|
||||
or
|
||||
exists(LogicalNotInstruction cond | result = get_branch_for_condition(cond) and cond.getUnary() = guard)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user