mirror of
https://github.com/github/codeql.git
synced 2026-04-23 07:45:17 +02:00
Merge pull request #17998 from yoff/shared/locations-in-range-analysis
This commit is contained in:
@@ -75,7 +75,7 @@ private import semmle.code.java.Maps
|
||||
import Bound
|
||||
private import codeql.rangeanalysis.RangeAnalysis
|
||||
|
||||
module Sem implements Semantic {
|
||||
module Sem implements Semantic<Location> {
|
||||
private import java as J
|
||||
private import SSA as SSA
|
||||
private import RangeUtils as RU
|
||||
@@ -266,7 +266,7 @@ module Sem implements Semantic {
|
||||
predicate conversionCannotOverflow = safeCast/2;
|
||||
}
|
||||
|
||||
module SignInp implements SignAnalysisSig<Sem> {
|
||||
module SignInp implements SignAnalysisSig<Location, Sem> {
|
||||
private import SignAnalysis
|
||||
private import internal.rangeanalysis.Sign
|
||||
|
||||
@@ -283,7 +283,7 @@ module SignInp implements SignAnalysisSig<Sem> {
|
||||
predicate semMayBeNegative(Sem::Expr e) { exprSign(e) = TNeg() }
|
||||
}
|
||||
|
||||
module Modulus implements ModulusAnalysisSig<Sem> {
|
||||
module Modulus implements ModulusAnalysisSig<Location, Sem> {
|
||||
class ModBound = Bound;
|
||||
|
||||
private import codeql.rangeanalysis.ModulusAnalysis as Mod
|
||||
@@ -309,7 +309,7 @@ module IntDelta implements DeltaSig {
|
||||
Delta fromFloat(float f) { result = f }
|
||||
}
|
||||
|
||||
module JavaLangImpl implements LangSig<Sem, IntDelta> {
|
||||
module JavaLangImpl implements LangSig<Location, Sem, IntDelta> {
|
||||
/**
|
||||
* Holds if `e >= bound` (if `upper = false`) or `e <= bound` (if `upper = true`).
|
||||
*/
|
||||
@@ -381,7 +381,7 @@ module Bounds implements BoundSig<Location, Sem, IntDelta> {
|
||||
}
|
||||
}
|
||||
|
||||
module Overflow implements OverflowSig<Sem, IntDelta> {
|
||||
module Overflow implements OverflowSig<Location, Sem, IntDelta> {
|
||||
predicate semExprDoesNotOverflow(boolean positively, Sem::Expr expr) {
|
||||
positively = [true, false] and exists(expr)
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ private import semmle.code.java.Constants
|
||||
private import semmle.code.java.dataflow.RangeAnalysis
|
||||
private import codeql.rangeanalysis.internal.RangeUtils
|
||||
|
||||
private module U = MakeUtils<Sem, IntDelta>;
|
||||
private module U = MakeUtils<Location, Sem, IntDelta>;
|
||||
|
||||
private predicate backEdge = U::backEdge/3;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user