mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
C++: Add an interface for exprs that can contribute to range analysis
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Provides a class for modeling `Expr`s with a restricted range.
|
||||
*/
|
||||
import cpp
|
||||
|
||||
/**
|
||||
* An expression for which a range can be deduced.
|
||||
*/
|
||||
abstract class RangeAnalysisExpr extends Expr {
|
||||
/** Gets the lower bound of the expression. */
|
||||
abstract float getLowerBounds();
|
||||
/** Gets the upper bound of the expression. */
|
||||
abstract float getUpperBounds();
|
||||
/** Holds if this expression depends on the definition `srcDef` for StackVariable `srcVar`. */
|
||||
predicate dependsOnDef(RangeSsaDefinition srcDef, StackVariable srcVar) { none() }
|
||||
}
|
||||
Reference in New Issue
Block a user