From ab15d79f67c126b5d1f1f3efd4cd9735c3517f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nora=20Dimitrijevi=C4=87?= Date: Tue, 25 Jun 2024 11:24:12 +0200 Subject: [PATCH] =?UTF-8?q?SimpleRangeAnalysis:=20Remove=20=C2=B1Inf=20typ?= =?UTF-8?q?eBounds=20for=20FloatingPointType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If this doesn't break any tests, then this will simplify the rewrite of all SimpleRangeAnalysis floats to BigInt. --- .../lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll | 3 --- 1 file changed, 3 deletions(-) diff --git a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll index eb167a09c4c4d..d4aad723fe3c1 100644 --- a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll +++ b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll @@ -405,9 +405,6 @@ private predicate typeBounds(ArithmeticType t, float lb, float ub) { lb = 0 and ub = limit - 1 ) ) - or - // This covers all floating point types. The range is (-Inf, +Inf). - t instanceof FloatingPointType and lb = -(1.0 / 0.0) and ub = 1.0 / 0.0 } private Type stripReference(Type t) {