Skip to content

Commit 34abab0

Browse files
authored
Merge pull request #13596 from MathiasVP/fix-join-in-argumentnode
C++: Fix join in `argumentOf`
2 parents f051702 + 78f2fe8 commit 34abab0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,11 @@ private class PrimaryArgumentNode extends ArgumentNode, OperandNode {
321321

322322
private class SideEffectArgumentNode extends ArgumentNode, SideEffectOperandNode {
323323
override predicate argumentOf(DataFlowCall dfCall, ArgumentPosition pos) {
324-
this.getCallInstruction() = dfCall and
325-
pos.(IndirectionPosition).getArgumentIndex() = this.getArgumentIndex() and
326-
super.hasAddressOperandAndIndirectionIndex(_, pos.(IndirectionPosition).getIndirectionIndex())
324+
exists(int indirectionIndex |
325+
pos = TIndirectionPosition(argumentIndex, pragma[only_bind_into](indirectionIndex)) and
326+
this.getCallInstruction() = dfCall and
327+
super.hasAddressOperandAndIndirectionIndex(_, pragma[only_bind_into](indirectionIndex))
328+
)
327329
}
328330
}
329331

0 commit comments

Comments
 (0)