Skip to content

Commit

Permalink
C++: Ensure that 'argumentOf' does not map to multiple argument posit…
Browse files Browse the repository at this point in the history
…ions.
  • Loading branch information
MathiasVP committed Jan 18, 2025
1 parent 9970f78 commit 2448475
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ private class SideEffectArgumentNode extends ArgumentNode, SideEffectOperandNode
exists(int indirectionIndex |
pos = TIndirectionPosition(argumentIndex, pragma[only_bind_into](indirectionIndex)) and
this.getCallInstruction() = dfCall.asCallInstruction() and
super.hasAddressOperandAndIndirectionIndex(_, pragma[only_bind_into](indirectionIndex))
super.hasAddressOperandAndIndirectionIndex(arg, pragma[only_bind_into](indirectionIndex))
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -757,9 +757,11 @@ class SsaIteratorNode extends Node, TSsaIteratorNode {
class SideEffectOperandNode extends Node instanceof IndirectOperand {
CallInstruction call;
int argumentIndex;
ArgumentOperand arg;

SideEffectOperandNode() {
IndirectOperand.super.hasOperandAndIndirectionIndex(call.getArgumentOperand(argumentIndex), _)
arg = call.getArgumentOperand(argumentIndex) and
IndirectOperand.super.hasOperandAndIndirectionIndex(arg, _)
}

CallInstruction getCallInstruction() { result = call }
Expand Down

0 comments on commit 2448475

Please sign in to comment.