Skip to content

Commit b890b16

Browse files
committed
C++: Restrict the side effect of StoreChainEndInstructionSideEffect to be WriteSideEffectInstructions
1 parent ce34d91 commit b890b16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,13 +435,13 @@ private Instruction skipConversion(Instruction instr) {
435435
* before entering `setter`.
436436
*/
437437
private class StoreChainEndInstructionSideEffect extends StoreChainEndInstruction, ChiInstruction {
438-
SideEffectInstruction sideEffect;
438+
WriteSideEffectInstruction sideEffect;
439439
FieldAddressInstruction fi;
440440

441441
StoreChainEndInstructionSideEffect() {
442442
not this.isResultConflated() and
443443
this.getPartial() = sideEffect and
444-
fi = skipConversion*(sideEffect.getAnOperand().getDef())
444+
fi = skipConversion*(sideEffect.getArgumentDef())
445445
}
446446

447447
override FieldAddressInstruction getFieldInstruction() { result = fi }

0 commit comments

Comments
 (0)