Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d04d9e

Browse files
author
Robert Marsh
committed
C++: sync NegateInstruction between IR passes
1 parent 6d06db7 commit 2d04d9e

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

cpp/ql/src/semmle/code/cpp/ir/implementation/raw/Instruction.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,12 @@ class RemInstruction extends BinaryInstruction {
761761
}
762762
}
763763

764+
class NegateInstruction extends UnaryInstruction {
765+
NegateInstruction() {
766+
opcode instanceof Opcode::Negate
767+
}
768+
}
769+
764770
class BitAndInstruction extends BinaryInstruction {
765771
BitAndInstruction() {
766772
opcode instanceof Opcode::BitAnd

cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/Instruction.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,12 @@ class RemInstruction extends BinaryInstruction {
761761
}
762762
}
763763

764+
class NegateInstruction extends UnaryInstruction {
765+
NegateInstruction() {
766+
opcode instanceof Opcode::Negate
767+
}
768+
}
769+
764770
class BitAndInstruction extends BinaryInstruction {
765771
BitAndInstruction() {
766772
opcode instanceof Opcode::BitAnd

0 commit comments

Comments
 (0)