clang 10.0.0git

Public Types | Public Member Functions | List of all members
clang::ento::RangeSet Class Reference

RangeSet contains a set of ranges. More...

`#include "clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h"`

## Public Types
typedef PrimRangeSet::Factory | Factory
typedef PrimRangeSet::iterator | iterator

## Public Member Functions
| RangeSet (PrimRangeSet RS)
RangeSet | addRange (Factory &F, const RangeSet &RS)
| Create a new set with all ranges of this set and RS. More...
iterator | begin () const
iterator | end () const
bool | isEmpty () const
| RangeSet (Factory &F, const llvm::APSInt &from, const llvm::APSInt &to)
| Construct a new RangeSet representing '{ [from, to] }'. More...
void | Profile (llvm::FoldingSetNodeID &ID) const
| Profile - Generates a hash profile of this RangeSet for use by FoldingSet. More...
const llvm::APSInt * | getConcreteValue () const
| getConcreteValue - If a symbol is contrained to equal a specific integer constant then this method returns that value. More...
RangeSet | Intersect (BasicValueFactory &BV, Factory &F, llvm::APSInt Lower, llvm::APSInt Upper) const
RangeSet | Intersect (BasicValueFactory &BV, Factory &F, const RangeSet &Other) const
RangeSet | Negate (BasicValueFactory &BV, Factory &F) const
void | print (raw_ostream &os) const
bool | operator== (const RangeSet &other) const

## Detailed Description

RangeSet contains a set of ranges.

If the set is empty, then there the value of a symbol is overly constrained and there are no possible values for that symbol.

Definition at line 63 of file RangedConstraintManager.h.

## Member Typedef Documentation

## ◆ Factory

typedef PrimRangeSet::Factory clang::ento::RangeSet::Factory

Definition at line 69 of file RangedConstraintManager.h.

## ◆ iterator

typedef PrimRangeSet::iterator clang::ento::RangeSet::iterator

Definition at line 70 of file RangedConstraintManager.h.

## Constructor & Destructor Documentation

## ◆ RangeSet() [1/2]

clang::ento::RangeSet::RangeSet | ( | PrimRangeSet | RS | ) |
| inline

Definition at line 72 of file RangedConstraintManager.h.

Referenced by applyBitwiseConstraints(), and print().

## ◆ RangeSet() [2/2]

clang::ento::RangeSet::RangeSet | ( | Factory & | F,
|  | const llvm::APSInt & | from,
|  | const llvm::APSInt & | to
| ) |  |
| inline

Construct a new RangeSet representing '{ [from, to] }'.

Definition at line 89 of file RangedConstraintManager.h.

## Member Function Documentation

## ◆ addRange()

RangeSet clang::ento::RangeSet::addRange | ( | Factory & | F,
|  | const RangeSet & | RS
| ) |  |
| inline

Create a new set with all ranges of this set and RS.

Possible intersections are not checked here.

Definition at line 76 of file RangedConstraintManager.h.

References clang::transformer::range().

## ◆ begin()

iterator clang::ento::RangeSet::begin | ( |  | ) | const
| inline

Definition at line 83 of file RangedConstraintManager.h.

Referenced by Intersect(), Negate(), and print().

## ◆ end()

iterator clang::ento::RangeSet::end | ( |  | ) | const
| inline

Definition at line 84 of file RangedConstraintManager.h.

Referenced by Intersect(), Negate(), and print().

## ◆ getConcreteValue()

const llvm::APSInt* clang::ento::RangeSet::getConcreteValue | ( |  | ) | const
| inline

getConcreteValue - If a symbol is contrained to equal a specific integer constant then this method returns that value.

Otherwise, it returns NULL.

Definition at line 99 of file RangedConstraintManager.h.

References print().

Referenced by clang::ento::CreateRangeConstraintManager().

## ◆ Intersect() [1/2]

RangeSet RangeSet::Intersect | ( | BasicValueFactory & | BV,
|  | Factory & | F,
|  | llvm::APSInt | Lower,
|  | llvm::APSInt | Upper
| ) |  | const

Definition at line 156 of file RangeConstraintManager.cpp.

References begin(), end(), clang::ento::BasicValueFactory::getMaxValue(), and clang::ento::BasicValueFactory::getMinValue().

Referenced by clang::ento::CreateRangeConstraintManager(), and Intersect().

## ◆ Intersect() [2/2]

RangeSet RangeSet::Intersect | ( | BasicValueFactory & | BV,
|  | Factory & | F,
|  | const RangeSet & | Other
| ) |  | const

Definition at line 179 of file RangeConstraintManager.cpp.

References begin(), end(), and Intersect().

## ◆ isEmpty()

bool clang::ento::RangeSet::isEmpty | ( |  | ) | const
| inline

Definition at line 86 of file RangedConstraintManager.h.

Referenced by clang::ento::CreateRangeConstraintManager().

## ◆ Negate()

RangeSet RangeSet::Negate | ( | BasicValueFactory & | BV,
|  | Factory & | F
| ) |  | const

Definition at line 196 of file RangeConstraintManager.cpp.

References begin(), end(), clang::ento::BasicValueFactory::getMaxValue(), and clang::ento::BasicValueFactory::getMinValue().

## ◆ operator==()

bool clang::ento::RangeSet::operator== | ( | const RangeSet & | other | ) | const
| inline

Definition at line 122 of file RangedConstraintManager.h.

## ◆ print()

void RangeSet::print | ( | raw_ostream & | os | ) | const

Definition at line 225 of file RangeConstraintManager.cpp.

References begin(), end(), RangeSet(), State, V, and X.

## ◆ Profile()

void clang::ento::RangeSet::Profile | ( | llvm::FoldingSetNodeID & | ID | ) | const
| inline

Profile - Generates a hash profile of this RangeSet for use by FoldingSet.

Definition at line 94 of file RangedConstraintManager.h.

The documentation for this class was generated from the following files:

- include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h
- lib/StaticAnalyzer/Core/RangeConstraintManager.cpp