mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
Merge pull request #12616 from aschackmull/java-csharp/redundant-sign-analysis-case
Java/C#: Remove useless disjuncts.
This commit is contained in:
@@ -45,10 +45,6 @@ private Sign certainExprSign(Expr e) {
|
||||
private predicate unknownSign(Expr e) {
|
||||
not exists(certainExprSign(e)) and
|
||||
(
|
||||
exists(IntegerLiteral lit | lit = e and not exists(lit.getValue().toInt()))
|
||||
or
|
||||
exists(LongLiteral lit | lit = e and not exists(lit.getValue().toFloat()))
|
||||
or
|
||||
exists(CastingExpr cast, Type fromtyp |
|
||||
cast = e and
|
||||
fromtyp = cast.getSourceType() and
|
||||
|
||||
@@ -45,10 +45,6 @@ private Sign certainExprSign(Expr e) {
|
||||
private predicate unknownSign(Expr e) {
|
||||
not exists(certainExprSign(e)) and
|
||||
(
|
||||
exists(IntegerLiteral lit | lit = e and not exists(lit.getValue().toInt()))
|
||||
or
|
||||
exists(LongLiteral lit | lit = e and not exists(lit.getValue().toFloat()))
|
||||
or
|
||||
exists(CastingExpr cast, Type fromtyp |
|
||||
cast = e and
|
||||
fromtyp = cast.getSourceType() and
|
||||
|
||||
Reference in New Issue
Block a user