File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
cpp/ql/lib/semmle/code/cpp/ir/implementation Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -725,6 +725,20 @@ class UninitializedInstruction extends VariableInstruction {
725
725
* Gets the variable that is uninitialized.
726
726
*/
727
727
final Language:: Variable getLocalVariable ( ) { result = var .( IRUserVariable ) .getVariable ( ) }
728
+
729
+ /**
730
+ * Gets the operand that provides the address of the location to which the
731
+ * uninitialized value will be stored.
732
+ */
733
+ final AddressOperand getDestinationAddressOperand ( ) { result = this .getAnOperand ( ) }
734
+
735
+ /**
736
+ * Gets the instruction whose result provides the address of the location to
737
+ * which the value will be stored, if an exact definition is available.
738
+ */
739
+ final Instruction getDestinationAddress ( ) {
740
+ result = this .getDestinationAddressOperand ( ) .getDef ( )
741
+ }
728
742
}
729
743
730
744
/**
Original file line number Diff line number Diff line change @@ -725,6 +725,20 @@ class UninitializedInstruction extends VariableInstruction {
725
725
* Gets the variable that is uninitialized.
726
726
*/
727
727
final Language:: Variable getLocalVariable ( ) { result = var .( IRUserVariable ) .getVariable ( ) }
728
+
729
+ /**
730
+ * Gets the operand that provides the address of the location to which the
731
+ * uninitialized value will be stored.
732
+ */
733
+ final AddressOperand getDestinationAddressOperand ( ) { result = this .getAnOperand ( ) }
734
+
735
+ /**
736
+ * Gets the instruction whose result provides the address of the location to
737
+ * which the value will be stored, if an exact definition is available.
738
+ */
739
+ final Instruction getDestinationAddress ( ) {
740
+ result = this .getDestinationAddressOperand ( ) .getDef ( )
741
+ }
728
742
}
729
743
730
744
/**
You can’t perform that action at this time.
0 commit comments