mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Rangeanalysis: Remove superfluous ignoreSsaReadCopy.
This commit is contained in:
@@ -8,14 +8,6 @@ private import RangeAnalysisImpl
|
|||||||
private import codeql.rangeanalysis.RangeAnalysis
|
private import codeql.rangeanalysis.RangeAnalysis
|
||||||
|
|
||||||
module CppLangImplConstant implements LangSig<Sem, FloatDelta> {
|
module CppLangImplConstant implements LangSig<Sem, FloatDelta> {
|
||||||
/**
|
|
||||||
* Holds if the specified expression should be excluded from the result of `ssaRead()`.
|
|
||||||
*
|
|
||||||
* This predicate is to keep the results identical to the original Java implementation. It should be
|
|
||||||
* removed once we have the new implementation matching the old results exactly.
|
|
||||||
*/
|
|
||||||
predicate ignoreSsaReadCopy(SemExpr e) { none() }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ignore the bound on this expression.
|
* Ignore the bound on this expression.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -9,14 +9,6 @@ private import semmle.code.cpp.rangeanalysis.RangeAnalysisUtils
|
|||||||
private import codeql.rangeanalysis.RangeAnalysis
|
private import codeql.rangeanalysis.RangeAnalysis
|
||||||
|
|
||||||
module CppLangImplRelative implements LangSig<Sem, FloatDelta> {
|
module CppLangImplRelative implements LangSig<Sem, FloatDelta> {
|
||||||
/**
|
|
||||||
* Holds if the specified expression should be excluded from the result of `ssaRead()`.
|
|
||||||
*
|
|
||||||
* This predicate is to keep the results identical to the original Java implementation. It should be
|
|
||||||
* removed once we have the new implementation matching the old results exactly.
|
|
||||||
*/
|
|
||||||
predicate ignoreSsaReadCopy(SemExpr e) { none() }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ignore the bound on this expression.
|
* Ignore the bound on this expression.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -32,8 +32,7 @@ module RangeUtil<DeltaSig D, LangSig<Sem, D> Lang> implements UtilSig<Sem, D> {
|
|||||||
result = v.(SemSsaExplicitUpdate).getSourceExpr() and
|
result = v.(SemSsaExplicitUpdate).getSourceExpr() and
|
||||||
delta = D::fromFloat(0)
|
delta = D::fromFloat(0)
|
||||||
or
|
or
|
||||||
result.(SemCopyValueExpr).getOperand() = semSsaRead(v, delta) and
|
result.(SemCopyValueExpr).getOperand() = semSsaRead(v, delta)
|
||||||
not Lang::ignoreSsaReadCopy(result)
|
|
||||||
or
|
or
|
||||||
result.(SemStoreExpr).getOperand() = semSsaRead(v, delta)
|
result.(SemStoreExpr).getOperand() = semSsaRead(v, delta)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,8 +315,6 @@ module IntDelta implements DeltaSig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module JavaLangImpl implements LangSig<Sem, IntDelta> {
|
module JavaLangImpl implements LangSig<Sem, IntDelta> {
|
||||||
predicate ignoreSsaReadCopy(Sem::Expr e) { none() }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `e >= bound` (if `upper = false`) or `e <= bound` (if `upper = true`).
|
* Holds if `e >= bound` (if `upper = false`) or `e <= bound` (if `upper = true`).
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -250,14 +250,6 @@ signature module DeltaSig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
signature module LangSig<Semantic Sem, DeltaSig D> {
|
signature module LangSig<Semantic Sem, DeltaSig D> {
|
||||||
/**
|
|
||||||
* Holds if the specified expression should be excluded from the result of `ssaRead()`.
|
|
||||||
*
|
|
||||||
* This predicate is to keep the results identical to the original Java implementation. It should be
|
|
||||||
* removed once we have the new implementation matching the old results exactly.
|
|
||||||
*/
|
|
||||||
predicate ignoreSsaReadCopy(Sem::Expr e);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `e >= bound` (if `upper = false`) or `e <= bound` (if `upper = true`).
|
* Holds if `e >= bound` (if `upper = false`) or `e <= bound` (if `upper = true`).
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user