mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #20886 from aschackmull/java/rangeanalysis-longliterals
Java: Recognize int-sized long literals.
This commit is contained in:
@@ -86,6 +86,8 @@ pragma[nomagic]
|
|||||||
private predicate constantIntegerExpr(Expr e, int val) {
|
private predicate constantIntegerExpr(Expr e, int val) {
|
||||||
e.(CompileTimeConstantExpr).getIntValue() = val
|
e.(CompileTimeConstantExpr).getIntValue() = val
|
||||||
or
|
or
|
||||||
|
e.(LongLiteral).getValue().toInt() = val
|
||||||
|
or
|
||||||
exists(SsaExplicitWrite v, Expr src |
|
exists(SsaExplicitWrite v, Expr src |
|
||||||
e = v.getARead() and
|
e = v.getARead() and
|
||||||
src = v.getValue() and
|
src = v.getValue() and
|
||||||
|
|||||||
Reference in New Issue
Block a user