Skip to content

Commit f12dfda

Browse files
authored
Merge pull request #985 from rdmarsh2/rdmarsh/ir-call-side-effect
C++: fix PrimaryInstruction for call side effects
2 parents 74a4103 + af490a9 commit f12dfda

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cpp/ql/src/semmle/code/cpp/ir/implementation/raw/internal/TranslatedCall.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,12 @@ abstract class TranslatedCall extends TranslatedExpr {
218218
private predicate hasSideEffect() {
219219
hasReadSideEffect() or hasWriteSideEffect()
220220
}
221+
222+
override Instruction getPrimaryInstructionForSideEffect(InstructionTag tag) {
223+
hasSideEffect() and
224+
tag = CallSideEffectTag() and
225+
result = getResult()
226+
}
221227
}
222228

223229
/**

0 commit comments

Comments
 (0)