File tree Expand file tree Collapse file tree
cpp/ql/src/semmle/code/cpp/ir/implementation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,10 +21,14 @@ class Operand extends TOperand {
2121 result = "Operand"
2222 }
2323
24- Location getLocation ( ) {
24+ final Location getLocation ( ) {
2525 result = getUseInstruction ( ) .getLocation ( )
2626 }
2727
28+ final FunctionIR getEnclosingFunctionIR ( ) {
29+ result = getUseInstruction ( ) .getEnclosingFunctionIR ( )
30+ }
31+
2832 /**
2933 * Gets the `Instruction` that consumes this operand.
3034 */
@@ -91,7 +95,7 @@ class Operand extends TOperand {
9195 * a known constant size, this predicate does not hold.
9296 */
9397 int getSize ( ) {
94- result = getDefinitionInstruction ( ) .getResultSize ( )
98+ result = getType ( ) .getSize ( )
9599 }
96100}
97101
Original file line number Diff line number Diff line change @@ -21,10 +21,14 @@ class Operand extends TOperand {
2121 result = "Operand"
2222 }
2323
24- Location getLocation ( ) {
24+ final Location getLocation ( ) {
2525 result = getUseInstruction ( ) .getLocation ( )
2626 }
2727
28+ final FunctionIR getEnclosingFunctionIR ( ) {
29+ result = getUseInstruction ( ) .getEnclosingFunctionIR ( )
30+ }
31+
2832 /**
2933 * Gets the `Instruction` that consumes this operand.
3034 */
@@ -91,7 +95,7 @@ class Operand extends TOperand {
9195 * a known constant size, this predicate does not hold.
9296 */
9397 int getSize ( ) {
94- result = getDefinitionInstruction ( ) .getResultSize ( )
98+ result = getType ( ) .getSize ( )
9599 }
96100}
97101
Original file line number Diff line number Diff line change @@ -21,10 +21,14 @@ class Operand extends TOperand {
2121 result = "Operand"
2222 }
2323
24- Location getLocation ( ) {
24+ final Location getLocation ( ) {
2525 result = getUseInstruction ( ) .getLocation ( )
2626 }
2727
28+ final FunctionIR getEnclosingFunctionIR ( ) {
29+ result = getUseInstruction ( ) .getEnclosingFunctionIR ( )
30+ }
31+
2832 /**
2933 * Gets the `Instruction` that consumes this operand.
3034 */
@@ -91,7 +95,7 @@ class Operand extends TOperand {
9195 * a known constant size, this predicate does not hold.
9296 */
9397 int getSize ( ) {
94- result = getDefinitionInstruction ( ) .getResultSize ( )
98+ result = getType ( ) .getSize ( )
9599 }
96100}
97101
You can’t perform that action at this time.
0 commit comments