[all-commits] [llvm/llvm-project] ba92b2: [analyzer] Improved RangeSet::Negate support of un...
Denys Petrov via All-commits
all-commits at lists.llvm.org
Mon May 25 08:52:41 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: ba92b274225fc78dc15e8dc0076f71e7a8b5d084
https://github.com/llvm/llvm-project/commit/ba92b274225fc78dc15e8dc0076f71e7a8b5d084
Author: Denys Petrov <dpetrov at accesssoftek.com>
Date: 2020-05-25 (Mon, 25 May 2020)
Changed paths:
M clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
M clang/test/Analysis/constraint_manager_negate_difference.c
M clang/unittests/StaticAnalyzer/CMakeLists.txt
A clang/unittests/StaticAnalyzer/RangeSetTest.cpp
Log Message:
-----------
[analyzer] Improved RangeSet::Negate support of unsigned ranges
Summary:
This fixes https://bugs.llvm.org/show_bug.cgi?id=41588
RangeSet Negate function shall handle unsigned ranges as well as signed ones.
RangeSet getRangeForMinusSymbol function shall use wider variety of ranges, not only concrete value ranges.
RangeSet Intersect functions shall not produce assertions.
Changes:
Improved safety of RangeSet::Intersect function. Added isEmpty() check to prevent an assertion.
Added support of handling unsigned ranges to RangeSet::Negate and RangeSet::getRangeForMinusSymbol.
Extended RangeSet::getRangeForMinusSymbol to return not only range sets with single value [n,n], but with wide ranges [n,m].
Added unit test for Negate function.
Added regression tests for unsigned values.
Differential Revision: https://reviews.llvm.org/D77802
More information about the All-commits
mailing list