mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
C++: add isStrict to RelationalInstruction
This commit is contained in:
@@ -974,6 +974,7 @@ class RelationalInstruction extends CompareInstruction {
|
||||
|
||||
abstract Instruction getGreaterOperand();
|
||||
abstract Instruction getLesserOperand();
|
||||
abstract predicate isStrict();
|
||||
}
|
||||
|
||||
class CompareLTInstruction extends RelationalInstruction {
|
||||
@@ -988,6 +989,10 @@ class CompareLTInstruction extends RelationalInstruction {
|
||||
override Instruction getGreaterOperand() {
|
||||
result = getRightOperand()
|
||||
}
|
||||
|
||||
override predicate isStrict() {
|
||||
any()
|
||||
}
|
||||
}
|
||||
|
||||
class CompareGTInstruction extends RelationalInstruction {
|
||||
@@ -1002,6 +1007,10 @@ class CompareGTInstruction extends RelationalInstruction {
|
||||
override Instruction getGreaterOperand() {
|
||||
result = getLeftOperand()
|
||||
}
|
||||
|
||||
override predicate isStrict() {
|
||||
any()
|
||||
}
|
||||
}
|
||||
|
||||
class CompareLEInstruction extends RelationalInstruction {
|
||||
@@ -1016,6 +1025,10 @@ class CompareLEInstruction extends RelationalInstruction {
|
||||
override Instruction getGreaterOperand() {
|
||||
result = getRightOperand()
|
||||
}
|
||||
|
||||
override predicate isStrict() {
|
||||
none()
|
||||
}
|
||||
}
|
||||
|
||||
class CompareGEInstruction extends RelationalInstruction {
|
||||
@@ -1030,6 +1043,10 @@ class CompareGEInstruction extends RelationalInstruction {
|
||||
override Instruction getGreaterOperand() {
|
||||
result = getLeftOperand()
|
||||
}
|
||||
|
||||
override predicate isStrict() {
|
||||
none()
|
||||
}
|
||||
}
|
||||
|
||||
class SwitchInstruction extends Instruction {
|
||||
|
||||
Reference in New Issue
Block a user