Skip to content

Commit 36285ba

Browse files
committed
C++: Fix pointer/pointee conflation.
1 parent a319fc0 commit 36285ba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ class IndirectOperand extends Node {
210210
this.(RawIndirectOperand).getOperand() = operand and
211211
this.(RawIndirectOperand).getIndirectionIndex() = indirectionIndex
212212
or
213-
this.(OperandNode).getOperand() =
214-
Ssa::getIRRepresentationOfIndirectOperand(operand, indirectionIndex)
213+
nodeHasOperand(this, Ssa::getIRRepresentationOfIndirectOperand(operand, indirectionIndex),
214+
indirectionIndex - 1)
215215
}
216216

217217
/** Gets the underlying operand. */
@@ -250,8 +250,8 @@ class IndirectInstruction extends Node {
250250
this.(RawIndirectInstruction).getInstruction() = instr and
251251
this.(RawIndirectInstruction).getIndirectionIndex() = indirectionIndex
252252
or
253-
this.(InstructionNode).getInstruction() =
254-
Ssa::getIRRepresentationOfIndirectInstruction(instr, indirectionIndex)
253+
nodeHasInstruction(this, Ssa::getIRRepresentationOfIndirectInstruction(instr, indirectionIndex),
254+
indirectionIndex - 1)
255255
}
256256

257257
/** Gets the underlying instruction. */

0 commit comments

Comments
 (0)