Skip to content

Commit 7985701

Browse files
committed
C++: Extend final IRBlock
1 parent 1507c88 commit 7985701

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/aliased_ssa/IRBlock.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@ module IRCfg implements BB::CfgSig<Language::Location> {
269269

270270
class SuccessorType = EdgeKind;
271271

272-
class BasicBlock extends IRBlock {
272+
final private class FinalIRBlock = IRBlock;
273+
274+
class BasicBlock extends FinalIRBlock {
273275
ControlFlowNode getNode(int i) { result = this.getInstruction(i) }
274276

275277
ControlFlowNode getLastNode() { result = super.getLastInstruction() }

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRBlock.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@ module IRCfg implements BB::CfgSig<Language::Location> {
269269

270270
class SuccessorType = EdgeKind;
271271

272-
class BasicBlock extends IRBlock {
272+
final private class FinalIRBlock = IRBlock;
273+
274+
class BasicBlock extends FinalIRBlock {
273275
ControlFlowNode getNode(int i) { result = this.getInstruction(i) }
274276

275277
ControlFlowNode getLastNode() { result = super.getLastInstruction() }

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRBlock.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@ module IRCfg implements BB::CfgSig<Language::Location> {
269269

270270
class SuccessorType = EdgeKind;
271271

272-
class BasicBlock extends IRBlock {
272+
final private class FinalIRBlock = IRBlock;
273+
274+
class BasicBlock extends FinalIRBlock {
273275
ControlFlowNode getNode(int i) { result = this.getInstruction(i) }
274276

275277
ControlFlowNode getLastNode() { result = super.getLastInstruction() }

0 commit comments

Comments
 (0)