From 267c3419659b8dfab03324c7d3f20f13e44db566 Mon Sep 17 00:00:00 2001 From: Robert Marsh Date: Tue, 14 Mar 2023 10:41:50 -0400 Subject: [PATCH] C++: exclude `ZeroBound`s in relative stage --- .../semmle/code/cpp/semantic/analysis/RangeAnalysisImpl.qll | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis/RangeAnalysisImpl.qll b/cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis/RangeAnalysisImpl.qll index e3cd555bc0c..31c751a8c6d 100644 --- a/cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis/RangeAnalysisImpl.qll +++ b/cpp/ql/lib/experimental/semmle/code/cpp/semantic/analysis/RangeAnalysisImpl.qll @@ -30,6 +30,10 @@ private module ConstantBounds implements BoundSig { private module RelativeBounds implements BoundSig { class SemBound instanceof SemanticBound::SemBound { + SemBound() { + not this instanceof SemanticBound::SemZeroBound + } + string toString() { result = super.toString() } Location getLocation() { result = super.getLocation() }