mirror of
https://github.com/github/codeql.git
synced 2026-03-30 20:28:15 +02:00
Java: Fix RangeAnalysis/ModulusAnalysis.
This commit is contained in:
@@ -220,6 +220,8 @@ module Sem implements Semantic<Location> {
|
||||
|
||||
int getBlockId1(BasicBlock bb) { idOf(bb, result) }
|
||||
|
||||
string getBlockId2(BasicBlock bb) { bb.getFirstNode().getIdTag() = result }
|
||||
|
||||
class Guard extends G::Guards_v2::Guard {
|
||||
Expr asExpr() { result = this }
|
||||
}
|
||||
|
||||
@@ -23,7 +23,9 @@ private predicate idOfAst(BB::ExprParent x, int y) = equivalenceRelation(id/2)(x
|
||||
|
||||
private predicate idOf(BasicBlock x, int y) { idOfAst(x.getFirstNode().getAstNode(), y) }
|
||||
|
||||
private int getId(BasicBlock bb) { idOf(bb, result) }
|
||||
private int getId1(BasicBlock bb) { idOf(bb, result) }
|
||||
|
||||
private string getId2(BasicBlock bb) { bb.getFirstNode().getIdTag() = result }
|
||||
|
||||
/**
|
||||
* Declarations to be exposed to users of SsaReadPositionCommon
|
||||
@@ -39,7 +41,7 @@ module Public {
|
||||
rank[r](SsaReadPositionPhiInputEdge e |
|
||||
e.phiInput(phi, _)
|
||||
|
|
||||
e order by getId(e.getOrigBlock())
|
||||
e order by getId1(e.getOrigBlock()), getId2(e.getOrigBlock())
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user