Skip to content

Commit 663c3e7

Browse files
committed
C++: Sync identical files.
1 parent 11cba94 commit 663c3e7

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/Instruction.qll

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,20 @@ class UninitializedInstruction extends VariableInstruction {
725725
* Gets the variable that is uninitialized.
726726
*/
727727
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+
}
728742
}
729743

730744
/**

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/Instruction.qll

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,20 @@ class UninitializedInstruction extends VariableInstruction {
725725
* Gets the variable that is uninitialized.
726726
*/
727727
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+
}
728742
}
729743

730744
/**

0 commit comments

Comments
 (0)