Skip to content

Commit feea29b

Browse files
committed
C++: Move classes.
1 parent c80bea3 commit feea29b

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,24 @@ private class ScrutineeValueNumber extends ValueNumber {
121121
Instruction getSuccessor(CaseEdge kind) { result = switch.getSuccessor(kind) }
122122
}
123123

124+
private class BuiltinExpectCallValueNumber extends ValueNumber {
125+
BuiltinExpectCallInstruction instr;
126+
127+
BuiltinExpectCallValueNumber() { this.getAnInstruction() = instr }
128+
129+
ValueNumber getCondition() { result.getAnInstruction() = instr.getCondition() }
130+
131+
Operand getAUse() { result = instr.getAUse() }
132+
}
133+
134+
private class LogicalNotValueNumber extends ValueNumber {
135+
LogicalNotInstruction instr;
136+
137+
LogicalNotValueNumber() { this.getAnInstruction() = instr }
138+
139+
ValueNumber getUnary() { result.getAnInstruction() = instr.getUnary() }
140+
}
141+
124142
/**
125143
* A Boolean condition in the AST that guards one or more basic blocks. This includes
126144
* operands of logical operators but not switch statements.
@@ -1008,24 +1026,6 @@ private class BuiltinExpectCallInstruction extends CallInstruction {
10081026
}
10091027
}
10101028

1011-
private class BuiltinExpectCallValueNumber extends ValueNumber {
1012-
BuiltinExpectCallInstruction instr;
1013-
1014-
BuiltinExpectCallValueNumber() { this.getAnInstruction() = instr }
1015-
1016-
ValueNumber getCondition() { result.getAnInstruction() = instr.getCondition() }
1017-
1018-
Operand getAUse() { result = instr.getAUse() }
1019-
}
1020-
1021-
private class LogicalNotValueNumber extends ValueNumber {
1022-
LogicalNotInstruction instr;
1023-
1024-
LogicalNotValueNumber() { this.getAnInstruction() = instr }
1025-
1026-
ValueNumber getUnary() { result.getAnInstruction() = instr.getUnary() }
1027-
}
1028-
10291029
/**
10301030
* Holds if `left == right + k` is `areEqual` if `cmp` evaluates to `value`,
10311031
* and `cmp` is an instruction that compares the value of

0 commit comments

Comments
 (0)