Skip to content
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f55ace8
C++: Make the return type a bit more precise.
MathiasVP Sep 17, 2025
f47dd2b
C++: Add a 'hasInputFromBlock' predicate.
MathiasVP Sep 17, 2025
be8195a
C++: Do not rely on dataflow nodes when implement 'getAUse' and 'getA…
MathiasVP Sep 17, 2025
19b8e0d
C++: Add a few subclasses to 'EdgeKind'.
MathiasVP Sep 17, 2025
70a8364
C++: Add another convenience predicate on 'BinaryInstruction'.
MathiasVP Sep 17, 2025
f0f4311
C++: Sync identical files.
MathiasVP Sep 17, 2025
2b0b840
C++: Delete a bunch of predicates. Also set up things so that they wo…
MathiasVP Sep 18, 2025
3a8f77d
C++: Qualified import of cpp.
MathiasVP Sep 18, 2025
840097f
C++: Instantiate the shared guards library.
MathiasVP Sep 17, 2025
ac5233d
C++: Lots of renamings.
MathiasVP Sep 17, 2025
9ed8b75
C++: Add a few helper predicates on 'Definition' which the guards lib…
MathiasVP Sep 18, 2025
0b81fbb
C++: Fixup tests.
MathiasVP Sep 17, 2025
2dc783d
C++: Accept test changes.
MathiasVP Sep 17, 2025
fbd877a
C++: Delete a test. This is no longer useful when every expression is…
MathiasVP Sep 17, 2025
5e82eb9
C++: Fixup queries which assumes that a guard is always an expression.
MathiasVP Sep 17, 2025
d8f34db
C++: Do not use the deprecated predicate in queries.
MathiasVP Sep 17, 2025
e22d665
C++: Fix barrier guards.
MathiasVP Sep 17, 2025
a4dbee3
C++: Add change note.
MathiasVP Sep 18, 2025
c481be8
C++: Accept test changes for tests that select all types of an expres…
MathiasVP Sep 18, 2025
b3cbdb5
C++: Add QLDoc to TRange.
MathiasVP Sep 24, 2025
2b47ac8
C++: Remove superfluous inference logic.
MathiasVP Sep 24, 2025
99e1a07
C++: Add a comment to the 'ConditionalBranchInstruction' case in 'add…
MathiasVP Sep 24, 2025
d10d5fd
C++: Rename in the name of consistency.
MathiasVP Sep 24, 2025
13cde4d
C++: Add testcase demonstrating that a ConstantValue IPA branch repre…
MathiasVP Sep 24, 2025
d15e388
C++: Get rid of the case range constant value with and instead implem…
MathiasVP Sep 24, 2025
b2269fb
C++: Add more tests.
MathiasVP Sep 24, 2025
26a8a4b
C++: Add failing test demonstrating broken wrapper barrier guards.
MathiasVP Sep 24, 2025
a07d03f
C++: Use the 'StoreInstruction' instead of the 'ReturnValueInstructio…
MathiasVP Sep 24, 2025
b169ccf
C++: Fully delete TRange.
MathiasVP Sep 25, 2025
5b5c1de
C++: Fix fan-out.
MathiasVP Sep 25, 2025
04ce405
C++: Add more comments to describe the constant expression hack.
MathiasVP Sep 25, 2025
c1c1f60
C++: Delete incorrect comment and add a bunch of barrier guard tests.
MathiasVP Sep 25, 2025
1b2bd30
Update cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll
MathiasVP Sep 30, 2025
ca53a8e
C++: Update QLDoc.
MathiasVP Sep 30, 2025
353ee8b
C++: Port a test from the experimental directory to show that it work…
MathiasVP Oct 1, 2025
b0e9238
Merge branch 'main' into use-shared-guards-library
MathiasVP Oct 1, 2025
011739c
Merge branch 'main' into use-shared-guards-library
MathiasVP Oct 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cpp/ql/lib/change-notes/2025-09-18-guards.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
category: breaking
---
* 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`.
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ private predicate boundFlowStepPhi(
or
exists(IRGuardCondition guard, boolean testIsTrue |
guard = boundFlowCond(valueNumberOfOperand(op2), op1, delta, upper, testIsTrue) and
guard.controlsEdge(op2.getPredecessorBlock(), op2.getUse().getBlock(), testIsTrue) and
guard.controlsBranchEdge(op2.getPredecessorBlock(), op2.getUse().getBlock(), testIsTrue) and
reason = TCondReason(guard)
)
}
Expand Down
Loading