class RangeSet

Declaration

class RangeSet { /* full declaration omitted */ };

Description

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.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:71

Member Variables

private clang::ento::RangeSet::UnderlyingType Impl

Method Overview

  • public void Profile(llvm::FoldingSetNodeID & ID) const
  • public static void Profile(llvm::FoldingSetNodeID & ID, const clang::ento::RangeSet & RS)
  • private RangeSet(clang::ento::RangeSet::UnderlyingType Ptr)
  • public RangeSet(const clang::ento::RangeSet &)
  • public RangeSet(clang::ento::RangeSet &&)
  • private RangeSet(clang::ento::RangeSet::ContainerType * RawContainer)
  • public RangeSet(clang::ento::RangeSet::Factory & F, const llvm::APSInt & From, const llvm::APSInt & To)
  • public RangeSet(clang::ento::RangeSet::Factory & F, const llvm::APSInt & Point)
  • public clang::ento::RangeSet::const_iterator begin() const
  • public bool contains(llvm::APSInt Point) const
  • private bool containsImpl(llvm::APSInt & Point) const
  • public bool containsZero() const
  • public void dump() const
  • public void dump(llvm::raw_ostream & OS) const
  • public bool encodesFalseRange() const
  • public bool encodesTrueRange() const
  • public clang::ento::RangeSet::const_iterator end() const
  • public clang::ento::APSIntType getAPSIntType() const
  • public uint32_t getBitWidth() const
  • public const llvm::APSInt * getConcreteValue() const
  • public const llvm::APSInt & getMaxValue() const
  • public const llvm::APSInt & getMinValue() const
  • public bool isEmpty() const
  • public bool isUnsigned() const
  • private bool pin(llvm::APSInt & Lower, llvm::APSInt & Upper) const
  • private bool pin(llvm::APSInt & Point) const
  • public size_t size() const
  • public ~RangeSet()

Methods

void Profile(llvm::FoldingSetNodeID& ID) const

Description

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

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:327

Parameters

llvm::FoldingSetNodeID& ID

static void Profile(
    llvm::FoldingSetNodeID& ID,
    const clang::ento::RangeSet& RS)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:321

Parameters

llvm::FoldingSetNodeID& ID
const clang::ento::RangeSet& RS

RangeSet(
    clang::ento::RangeSet::UnderlyingType Ptr)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:382

Parameters

clang::ento::RangeSet::UnderlyingType Ptr

RangeSet(const clang::ento::RangeSet&)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:307

Parameters

const clang::ento::RangeSet&

RangeSet(clang::ento::RangeSet&&)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:309

Parameters

clang::ento::RangeSet&&

RangeSet(clang::ento::RangeSet::ContainerType*
             RawContainer)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:381

Parameters

clang::ento::RangeSet::ContainerType* RawContainer

RangeSet(clang::ento::RangeSet::Factory& F,
         const llvm::APSInt& From,
         const llvm::APSInt& To)

Description

Construct a new RangeSet representing '{ [From, To] }'.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:314

Parameters

clang::ento::RangeSet::Factory& F
const llvm::APSInt& From
const llvm::APSInt& To

RangeSet(clang::ento::RangeSet::Factory& F,
         const llvm::APSInt& Point)

Description

Construct a new RangeSet representing the given point as a range.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:318

Parameters

clang::ento::RangeSet::Factory& F
const llvm::APSInt& Point

clang::ento::RangeSet::const_iterator begin()
    const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:115

bool contains(llvm::APSInt Point) const

Description

Test whether the given point is contained by any of the ranges. Complexity: O(logN) where N = size(this)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:353

Parameters

llvm::APSInt Point

bool containsImpl(llvm::APSInt& Point) const

Description

@ }

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:399

Parameters

llvm::APSInt& Point

bool containsZero() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:355

void dump() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:375

void dump(llvm::raw_ostream& OS) const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:374

Parameters

llvm::raw_ostream& OS

bool encodesFalseRange() const

Description

Test if the range is the [0,0] range. Complexity: O(1)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:363

bool encodesTrueRange() const

Description

Test if the range doesn't contain zero. Complexity: O(logN) where N = size(this)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:372

clang::ento::RangeSet::const_iterator end() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:116

clang::ento::APSIntType getAPSIntType() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:347

uint32_t getBitWidth() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:346

const llvm::APSInt* getConcreteValue() const

Description

getConcreteValue - If a symbol is constrained to equal a specific integer constant then this method returns that value. Otherwise, it returns NULL.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:332

const llvm::APSInt& getMaxValue() const

Description

Get the maximal value covered by the ranges in the set. Complexity: O(1)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:343

const llvm::APSInt& getMinValue() const

Description

Get the minimal value covered by the ranges in the set. Complexity: O(1)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:339

bool isEmpty() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:119

bool isUnsigned() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:345

bool pin(llvm::APSInt& Lower,
         llvm::APSInt& Upper) const

Description

Pin given points to the type represented by the current range set. This makes parameter points to be in-out parameters. In order to maintain consistent types across all of the ranges in the set and to keep all the operations to compare ONLY points of the same type, we need to pin every point before any operation.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:394

Parameters

llvm::APSInt& Lower
llvm::APSInt& Upper

Returns

true if the given points can be converted to the target type without changing the values (i.e. trivially) and false otherwise. @ {

bool pin(llvm::APSInt& Point) const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:395

Parameters

llvm::APSInt& Point

size_t size() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:117

~RangeSet()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:311