Skip to content

Commit 267a7f5

Browse files
authored
Merge pull request #20779 from MathiasVP/fix-bad-magic
C++: Fix bad magic in `IRGuards`
2 parents eb3e864 + 6a2debb commit 267a7f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cpp/ql/lib/semmle/code/cpp/controlflow/IRGuards.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,7 @@ private class GuardConditionFromBinaryLogicalOperator extends GuardConditionImpl
703703
)
704704
}
705705

706+
pragma[nomagic]
706707
override predicate comparesLt(
707708
Cpp::Expr left, Cpp::Expr right, int k, boolean isLessThan, boolean testIsTrue
708709
) {
@@ -713,6 +714,7 @@ private class GuardConditionFromBinaryLogicalOperator extends GuardConditionImpl
713714
)
714715
}
715716

717+
pragma[nomagic]
716718
override predicate comparesLt(Cpp::Expr e, int k, boolean isLessThan, GuardValue value) {
717719
exists(GuardValue partValue, GuardCondition part |
718720
this.(Cpp::BinaryLogicalOperation)
@@ -738,6 +740,7 @@ private class GuardConditionFromBinaryLogicalOperator extends GuardConditionImpl
738740
)
739741
}
740742

743+
pragma[nomagic]
741744
override predicate comparesEq(
742745
Cpp::Expr left, Cpp::Expr right, int k, boolean areEqual, boolean testIsTrue
743746
) {
@@ -757,6 +760,7 @@ private class GuardConditionFromBinaryLogicalOperator extends GuardConditionImpl
757760
)
758761
}
759762

763+
pragma[nomagic]
760764
override predicate comparesEq(Cpp::Expr e, int k, boolean areEqual, GuardValue value) {
761765
exists(GuardValue partValue, GuardCondition part |
762766
this.(Cpp::BinaryLogicalOperation)

0 commit comments

Comments
 (0)