Skip to content

Commit a34d6d4

Browse files
authored
Merge pull request #20485 from MathiasVP/use-shared-guards-library
C++: Switch to the shared Guards library
2 parents b5aa972 + 011739c commit a34d6d4

File tree

50 files changed

+2358
-930
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2358
-930
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: breaking
3+
---
4+
* The "Guards" libraries (`semmle.code.cpp.controlflow.Guards` and `semmle.code.cpp.controlflow.IRGuards`) have been totally rewritten to recognize many more guards. The API remains unchanged, but the `GuardCondition` class now extends `Element` instead of `Expr`.

cpp/ql/lib/experimental/semmle/code/cpp/rangeanalysis/RangeAnalysis.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ private predicate boundFlowStepPhi(
412412
or
413413
exists(IRGuardCondition guard, boolean testIsTrue |
414414
guard = boundFlowCond(valueNumberOfOperand(op2), op1, delta, upper, testIsTrue) and
415-
guard.controlsEdge(op2.getPredecessorBlock(), op2.getUse().getBlock(), testIsTrue) and
415+
guard.controlsBranchEdge(op2.getPredecessorBlock(), op2.getUse().getBlock(), testIsTrue) and
416416
reason = TCondReason(guard)
417417
)
418418
}

0 commit comments

Comments
 (0)