Skip to content

Commit dc6729d

Browse files
authored
Merge pull request github#12616 from aschackmull/java-csharp/redundant-sign-analysis-case
Java/C#: Remove useless disjuncts.
2 parents 663d4e8 + 89d9d65 commit dc6729d

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

csharp/ql/lib/semmle/code/csharp/dataflow/internal/rangeanalysis/SignAnalysisCommon.qll

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ private Sign certainExprSign(Expr e) {
4545
private predicate unknownSign(Expr e) {
4646
not exists(certainExprSign(e)) and
4747
(
48-
exists(IntegerLiteral lit | lit = e and not exists(lit.getValue().toInt()))
49-
or
50-
exists(LongLiteral lit | lit = e and not exists(lit.getValue().toFloat()))
51-
or
5248
exists(CastingExpr cast, Type fromtyp |
5349
cast = e and
5450
fromtyp = cast.getSourceType() and

java/ql/lib/semmle/code/java/dataflow/internal/rangeanalysis/SignAnalysisCommon.qll

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ private Sign certainExprSign(Expr e) {
4545
private predicate unknownSign(Expr e) {
4646
not exists(certainExprSign(e)) and
4747
(
48-
exists(IntegerLiteral lit | lit = e and not exists(lit.getValue().toInt()))
49-
or
50-
exists(LongLiteral lit | lit = e and not exists(lit.getValue().toFloat()))
51-
or
5248
exists(CastingExpr cast, Type fromtyp |
5349
cast = e and
5450
fromtyp = cast.getSourceType() and

0 commit comments

Comments
 (0)