mirror of
https://github.com/github/codeql.git
synced 2026-01-29 22:32:58 +01:00
Rename Comparison to ComparisonExpr.
This commit is contained in:
@@ -51,10 +51,10 @@ class AssocNestedExpr extends BinaryExpr {
|
||||
class HarmlessNestedExpr extends BinaryExpr {
|
||||
HarmlessNestedExpr() {
|
||||
exists(BinaryExpr parent | this = parent.getAChildExpr() |
|
||||
parent instanceof Comparison and
|
||||
parent instanceof ComparisonExpr and
|
||||
(this instanceof ArithmeticExpr or this instanceof ShiftExpr)
|
||||
or
|
||||
parent instanceof LogicalExpr and this instanceof Comparison
|
||||
parent instanceof LogicalExpr and this instanceof ComparisonExpr
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
import go
|
||||
|
||||
from Comparison cmp, Expr l
|
||||
from ComparisonExpr cmp, Expr l
|
||||
where
|
||||
l = cmp.getLeftOperand() and
|
||||
l.getGlobalValueNumber() = cmp.getRightOperand().getGlobalValueNumber() and
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
import go
|
||||
|
||||
from Comparison cmp, BuiltinFunction len, int ub, string r
|
||||
from ComparisonExpr cmp, BuiltinFunction len, int ub, string r
|
||||
where
|
||||
(len = Builtin::len() or len = Builtin::cap()) and
|
||||
(
|
||||
|
||||
@@ -800,12 +800,12 @@ class ShiftExpr extends @shiftexpr, BitwiseBinaryExpr { }
|
||||
/**
|
||||
* A comparison expression, that is, `==`, `!=`, `<`, `<=`, `>=` or `>`.
|
||||
*/
|
||||
class Comparison extends @comparison, BinaryExpr { }
|
||||
class ComparisonExpr extends @comparison, BinaryExpr { }
|
||||
|
||||
/**
|
||||
* An equality test, that is, `==` or `!=`.
|
||||
*/
|
||||
class EqualityTestExpr extends @equalitytest, Comparison {
|
||||
class EqualityTestExpr extends @equalitytest, ComparisonExpr {
|
||||
/** Gets the polarity of this equality test, that is, `true` for `==` and `false` for `!=`. */
|
||||
boolean getPolarity() { none() }
|
||||
}
|
||||
@@ -813,7 +813,7 @@ class EqualityTestExpr extends @equalitytest, Comparison {
|
||||
/**
|
||||
* A relational comparison, that is, `<`, `<=`, `>=` or `>`.
|
||||
*/
|
||||
class RelationalComparisonExpr extends @relationalcomparison, Comparison {
|
||||
class RelationalComparisonExpr extends @relationalcomparison, ComparisonExpr {
|
||||
/** Holds if this comparison is strict, that is, it implies inequality. */
|
||||
predicate isStrict() { none() }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user