Skip to content

Commit 75c74d5

Browse files
committed
C++: Use 'unique' in 'hasIRRepresentationOfIndirectInstruction' similar to how it's done in 'hasIRRepresentationOfIndirectOperand'.
1 parent 8e653d0 commit 75c74d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternalsCommon.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ private module Cached {
815815
) {
816816
indirectionIndex = [1 .. countIndirectionsForCppType(getResultLanguageType(instr))] and
817817
exists(Instruction load, Operand address |
818-
address.getDef() = instr and
818+
address = unique( | | getAUse(instr)) and
819819
isDereference(load, address, false) and
820820
instrRepr = load and
821821
indirectionIndexRepr = indirectionIndex - 1

0 commit comments

Comments
 (0)