Skip to content

Commit 6915e81

Browse files
committed
C++: Generate IR for assertions in release builds.
1 parent 9453835 commit 6915e81

File tree

3 files changed

+399
-2
lines changed

3 files changed

+399
-2
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/InstructionTag.qll

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ newtype TInstructionTag =
104104
} or
105105
SizeofVlaDimensionTag(int index) {
106106
exists(VlaDeclStmt v | exists(v.getTransitiveVlaDimensionStmt(index)))
107-
}
107+
} or
108+
AssertionVarAddressTag() or
109+
AssertionVarLoadTag() or
110+
AssertionOpTag() or
111+
AssertionBranchTag()
108112

109113
class InstructionTag extends TInstructionTag {
110114
final string toString() { result = getInstructionTagId(this) }
@@ -296,4 +300,12 @@ string getInstructionTagId(TInstructionTag tag) {
296300
tag = CoAwaitBranchTag() and result = "CoAwaitBranch"
297301
or
298302
tag = BoolToIntConversionTag() and result = "BoolToIntConversion"
303+
or
304+
tag = AssertionVarAddressTag() and result = "AssertionVarAddress"
305+
or
306+
tag = AssertionVarLoadTag() and result = "AssertionVarLoad"
307+
or
308+
tag = AssertionOpTag() and result = "AssertionOp"
309+
or
310+
tag = AssertionBranchTag() and result = "AssertionBranch"
299311
}

0 commit comments

Comments
 (0)