File tree Expand file tree Collapse file tree 5 files changed +25
-8
lines changed
cpp/ql/src/semmle/code/cpp/ir/implementation Expand file tree Collapse file tree 5 files changed +25
-8
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,11 @@ class FunctionIR extends TFunctionIR {
5656 result .getFunctionIR ( ) = this
5757 }
5858
59+ pragma [ noinline]
60+ final UnmodeledUseInstruction getUnmodeledUseInstruction ( ) {
61+ result .getFunctionIR ( ) = this
62+ }
63+
5964 /**
6065 * Gets the single return instruction for this function.
6166 */
Original file line number Diff line number Diff line change @@ -192,10 +192,11 @@ cached private module Cached {
192192 instruction .getTag ( ) = ChiTag ( getOldInstruction ( result ) ) and
193193 tag instanceof ChiPartialOperandTag
194194 or
195- instruction instanceof UnmodeledUseInstruction and
196- tag instanceof UnmodeledUseOperandTag and
197- result instanceof UnmodeledDefinitionInstruction and
198- instruction .getFunction ( ) = result .getFunction ( )
195+ exists ( FunctionIR f |
196+ tag instanceof UnmodeledUseOperandTag and
197+ result = f .getUnmodeledDefinitionInstruction ( ) and
198+ instruction = f .getUnmodeledUseInstruction ( )
199+ )
199200 or
200201 tag instanceof ChiTotalOperandTag and
201202 result = getChiInstructionTotalOperand ( instruction )
Original file line number Diff line number Diff line change @@ -56,6 +56,11 @@ class FunctionIR extends TFunctionIR {
5656 result .getFunctionIR ( ) = this
5757 }
5858
59+ pragma [ noinline]
60+ final UnmodeledUseInstruction getUnmodeledUseInstruction ( ) {
61+ result .getFunctionIR ( ) = this
62+ }
63+
5964 /**
6065 * Gets the single return instruction for this function.
6166 */
Original file line number Diff line number Diff line change @@ -56,6 +56,11 @@ class FunctionIR extends TFunctionIR {
5656 result .getFunctionIR ( ) = this
5757 }
5858
59+ pragma [ noinline]
60+ final UnmodeledUseInstruction getUnmodeledUseInstruction ( ) {
61+ result .getFunctionIR ( ) = this
62+ }
63+
5964 /**
6065 * Gets the single return instruction for this function.
6166 */
Original file line number Diff line number Diff line change @@ -192,10 +192,11 @@ cached private module Cached {
192192 instruction .getTag ( ) = ChiTag ( getOldInstruction ( result ) ) and
193193 tag instanceof ChiPartialOperandTag
194194 or
195- instruction instanceof UnmodeledUseInstruction and
196- tag instanceof UnmodeledUseOperandTag and
197- result instanceof UnmodeledDefinitionInstruction and
198- instruction .getFunction ( ) = result .getFunction ( )
195+ exists ( FunctionIR f |
196+ tag instanceof UnmodeledUseOperandTag and
197+ result = f .getUnmodeledDefinitionInstruction ( ) and
198+ instruction = f .getUnmodeledUseInstruction ( )
199+ )
199200 or
200201 tag instanceof ChiTotalOperandTag and
201202 result = getChiInstructionTotalOperand ( instruction )
You can’t perform that action at this time.
0 commit comments