mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
C++: remove side effect operands from non-reads
This commit is contained in:
@@ -48,8 +48,8 @@ module InstructionSanity {
|
||||
or
|
||||
(
|
||||
opcode instanceof ReadSideEffectOpcode or
|
||||
opcode instanceof MayWriteSideEffectOpcode or
|
||||
opcode instanceof Opcode::InlineAsm
|
||||
opcode instanceof Opcode::InlineAsm or
|
||||
opcode instanceof Opcode::CallSideEffect
|
||||
) and
|
||||
tag instanceof SideEffectOperandTag
|
||||
)
|
||||
|
||||
@@ -48,8 +48,8 @@ module InstructionSanity {
|
||||
or
|
||||
(
|
||||
opcode instanceof ReadSideEffectOpcode or
|
||||
opcode instanceof MayWriteSideEffectOpcode or
|
||||
opcode instanceof Opcode::InlineAsm
|
||||
opcode instanceof Opcode::InlineAsm or
|
||||
opcode instanceof Opcode::CallSideEffect
|
||||
) and
|
||||
tag instanceof SideEffectOperandTag
|
||||
)
|
||||
|
||||
@@ -449,12 +449,7 @@ class TranslatedSideEffect extends TranslatedElement, TTranslatedArgumentSideEff
|
||||
or
|
||||
tag instanceof OnlyInstructionTag and
|
||||
operandTag instanceof SideEffectOperandTag and
|
||||
not call.getTarget().(SideEffectFunction).hasSpecificWriteSideEffect(index, _, true) and
|
||||
result = getEnclosingFunction().getUnmodeledDefinitionInstruction()
|
||||
or
|
||||
tag instanceof OnlyInstructionTag and
|
||||
operandTag instanceof SideEffectOperandTag and
|
||||
call.getTarget().(SideEffectFunction).hasSpecificReadSideEffect(index, _) and
|
||||
not isWrite() and
|
||||
result = getEnclosingFunction().getUnmodeledDefinitionInstruction()
|
||||
or
|
||||
tag instanceof OnlyInstructionTag and
|
||||
|
||||
@@ -48,8 +48,8 @@ module InstructionSanity {
|
||||
or
|
||||
(
|
||||
opcode instanceof ReadSideEffectOpcode or
|
||||
opcode instanceof MayWriteSideEffectOpcode or
|
||||
opcode instanceof Opcode::InlineAsm
|
||||
opcode instanceof Opcode::InlineAsm or
|
||||
opcode instanceof Opcode::CallSideEffect
|
||||
) and
|
||||
tag instanceof SideEffectOperandTag
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user