clang 20.0.0git
|
persistent set of non-overlapping ranges. More...
#include "clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h"
Classes | |
class | Factory |
Public Types | |
using | const_iterator = ImplType::const_iterator |
Public Member Functions | |
const_iterator | begin () const |
const_iterator | end () const |
size_t | size () const |
bool | isEmpty () const |
RangeSet (const RangeSet &)=default | |
RangeSet & | operator= (const RangeSet &)=default |
RangeSet (RangeSet &&)=default | |
RangeSet & | operator= (RangeSet &&)=default |
~RangeSet ()=default | |
RangeSet (Factory &F, const llvm::APSInt &From, const llvm::APSInt &To) | |
Construct a new RangeSet representing '{ [From, To] }'. | |
RangeSet (Factory &F, const llvm::APSInt &Point) | |
Construct a new RangeSet representing the given point as a range. | |
void | Profile (llvm::FoldingSetNodeID &ID) const |
Profile - Generates a hash profile of this RangeSet for use by FoldingSet. | |
const llvm::APSInt * | getConcreteValue () const |
getConcreteValue - If a symbol is constrained to equal a specific integer constant then this method returns that value. | |
const llvm::APSInt & | getMinValue () const |
Get the minimal value covered by the ranges in the set. | |
const llvm::APSInt & | getMaxValue () const |
Get the maximal value covered by the ranges in the set. | |
bool | isUnsigned () const |
uint32_t | getBitWidth () const |
APSIntType | getAPSIntType () const |
bool | contains (llvm::APSInt Point) const |
Test whether the given point is contained by any of the ranges. | |
bool | containsZero () const |
bool | encodesFalseRange () const |
Test if the range is the [0,0] range. | |
bool | encodesTrueRange () const |
Test if the range doesn't contain zero. | |
void | dump (raw_ostream &OS) const |
void | dump () const |
bool | operator== (const RangeSet &Other) const |
bool | operator!= (const RangeSet &Other) const |
Static Public Member Functions | |
static void | Profile (llvm::FoldingSetNodeID &ID, const RangeSet &RS) |
Friends | |
class | Factory |
persistent set of non-overlapping ranges.
New RangeSet objects can be ONLY produced by RangeSet::Factory object, which also supports the most common operations performed on range sets.
Empty set corresponds to an overly constrained symbol meaning that there are no possible values for that symbol.
Definition at line 71 of file RangedConstraintManager.h.
using clang::ento::RangeSet::const_iterator = ImplType::const_iterator |
Definition at line 113 of file RangedConstraintManager.h.
|
default |
|
default |
|
default |
|
inline |
Construct a new RangeSet representing '{ [From, To] }'.
Definition at line 314 of file RangedConstraintManager.h.
|
inline |
Construct a new RangeSet representing the given point as a range.
Definition at line 318 of file RangedConstraintManager.h.
|
inline |
Definition at line 115 of file RangedConstraintManager.h.
Referenced by clang::ento::RangeSet::Factory::add(), getAPSIntType(), getBitWidth(), getConcreteValue(), getMinValue(), isUnsigned(), and clang::ento::RangeSet::Factory::negate().
|
inline |
Test whether the given point is contained by any of the ranges.
Complexity: O(logN) where N = size(this)
Definition at line 353 of file RangedConstraintManager.h.
Referenced by containsZero(), and clang::ento::RangeSet::Factory::deletePoint().
|
inline |
Definition at line 355 of file RangedConstraintManager.h.
References contains(), getMinValue(), and clang::T.
Referenced by encodesTrueRange().
LLVM_DUMP_METHOD void RangeSet::dump | ( | ) | const |
Definition at line 874 of file RangeConstraintManager.cpp.
References dump().
Referenced by clang::ento::Range::dump(), and dump().
LLVM_DUMP_METHOD void RangeSet::dump | ( | raw_ostream & | OS | ) | const |
Definition at line 869 of file RangeConstraintManager.cpp.
References clang::ento::Range::dump(), and clang::ento::OS.
|
inline |
Test if the range is the [0,0] range.
Complexity: O(1)
Definition at line 363 of file RangedConstraintManager.h.
References getConcreteValue().
Referenced by reAssume().
|
inline |
Test if the range doesn't contain zero.
Complexity: O(logN) where N = size(this)
Definition at line 372 of file RangedConstraintManager.h.
References containsZero().
Referenced by reAssume().
|
inline |
Definition at line 116 of file RangedConstraintManager.h.
Referenced by clang::ento::RangeSet::Factory::add(), getMaxValue(), and clang::ento::RangeSet::Factory::negate().
APSIntType clang::ento::RangeSet::getAPSIntType | ( | ) | const |
Definition at line 367 of file RangeConstraintManager.cpp.
References begin(), and isEmpty().
Referenced by clang::ento::RangeSet::Factory::castTo().
uint32_t clang::ento::RangeSet::getBitWidth | ( | ) | const |
Definition at line 362 of file RangeConstraintManager.cpp.
References begin(), and isEmpty().
Referenced by clang::ento::RangeSet::Factory::castTo().
|
inline |
getConcreteValue - If a symbol is constrained to equal a specific integer constant then this method returns that value.
Otherwise, it returns NULL.
Definition at line 332 of file RangedConstraintManager.h.
References begin().
Referenced by encodesFalseRange().
const llvm::APSInt & RangeSet::getMaxValue | ( | ) | const |
Get the maximal value covered by the ranges in the set.
Complexity: O(1)
Definition at line 352 of file RangeConstraintManager.cpp.
References end(), and isEmpty().
Referenced by clang::ento::RangeSet::Factory::intersect(), and reAssume().
const llvm::APSInt & RangeSet::getMinValue | ( | ) | const |
Get the minimal value covered by the ranges in the set.
Complexity: O(1)
Definition at line 347 of file RangeConstraintManager.cpp.
References begin(), and isEmpty().
Referenced by containsZero(), clang::ento::RangeSet::Factory::intersect(), clang::ento::RangeSet::Factory::negate(), and reAssume().
|
inline |
Definition at line 119 of file RangedConstraintManager.h.
Referenced by clang::ento::RangeSet::Factory::castTo(), getAPSIntType(), getBitWidth(), getMaxValue(), getMinValue(), clang::ento::RangeSet::Factory::intersect(), isUnsigned(), and clang::ento::RangeSet::Factory::negate().
bool clang::ento::RangeSet::isUnsigned | ( | ) | const |
Definition at line 357 of file RangeConstraintManager.cpp.
References begin(), and isEmpty().
Referenced by clang::ento::RangeSet::Factory::castTo().
Definition at line 378 of file RangedConstraintManager.h.
References clang::Other.
Definition at line 377 of file RangedConstraintManager.h.
References clang::Other.
|
inline |
|
inlinestatic |
Definition at line 321 of file RangedConstraintManager.h.
References ID.
|
inline |
Definition at line 117 of file RangedConstraintManager.h.
Referenced by clang::ento::RangeSet::Factory::add(), and clang::ento::RangeSet::Factory::negate().
|
friend |
Definition at line 401 of file RangedConstraintManager.h.