File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments