Skip to content

Commit ff60d96

Browse files
committed
C++: Sync identical files.
1 parent ec13492 commit ff60d96

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -933,11 +933,15 @@ module DefUse {
933933
bindingset[index, block]
934934
pragma[inline_late]
935935
private int getNonChiOffset(int index, OldBlock block) {
936-
exists(IRFunction func | func = block.getEnclosingIRFunction() |
936+
exists(OldIR::IRFunction func, Instruction i, OldBlock entryBlock |
937+
func = block.getEnclosingIRFunction() and
938+
i = block.getInstruction(index) and
939+
entryBlock = func.getEntryBlock()
940+
|
937941
if
938-
getNewBlock(block) = func.getEntryBlock() and
939-
not block.getInstruction(index) instanceof InitializeNonLocalInstruction and
940-
not block.getInstruction(index) instanceof AliasedDefinitionInstruction
942+
block = entryBlock and
943+
not i instanceof InitializeNonLocalInstruction and
944+
not i instanceof AliasedDefinitionInstruction
941945
then result = 2 * (index + count(VariableGroup vg | vg.getIRFunction() = func))
942946
else result = 2 * index
943947
)

0 commit comments

Comments
 (0)