Skip to content

Commit 70bccf8

Browse files
Merge pull request #970 from jbj/ir-block-count
C++: Use the cached getInstructionCount
2 parents 116997c + 6777c8c commit 70bccf8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class IRBlockBase extends TIRBlock {
6060
}
6161

6262
final int getInstructionCount() {
63-
result = strictcount(getInstruction(_))
63+
result = getInstructionCount(this)
6464
}
6565

6666
final FunctionIR getEnclosingFunctionIR() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class IRBlockBase extends TIRBlock {
6060
}
6161

6262
final int getInstructionCount() {
63-
result = strictcount(getInstruction(_))
63+
result = getInstructionCount(this)
6464
}
6565

6666
final FunctionIR getEnclosingFunctionIR() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class IRBlockBase extends TIRBlock {
6060
}
6161

6262
final int getInstructionCount() {
63-
result = strictcount(getInstruction(_))
63+
result = getInstructionCount(this)
6464
}
6565

6666
final FunctionIR getEnclosingFunctionIR() {

0 commit comments

Comments
 (0)