class SValBuilder

Declaration

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

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:53

Member Variables

protected clang::ASTContext& Context
protected clang::ento::BasicValueFactory BasicVals
Manager of APSInt values.
protected clang::ento::SymbolManager SymMgr
Manages the creation of symbols.
protected clang::ento::MemRegionManager MemMgr
Manages the creation of memory regions.
protected clang::ento::ProgramStateManager& StateMgr
protected const clang::AnalyzerOptions& AnOpts
protected const clang::QualType ArrayIndexTy
The scalar type to use for array indices.
protected const unsigned int ArrayIndexWidth
The width of the scalar type used for array indices.

Method Overview

  • public SValBuilder(llvm::BumpPtrAllocator & alloc, clang::ASTContext & context, clang::ento::ProgramStateManager & stateMgr)
  • private virtual void anchor()
  • public clang::ento::ConditionTruthVal areEqual(clang::ento::ProgramStateRef state, clang::ento::SVal lhs, clang::ento::SVal rhs)
  • public const clang::ento::SymbolConjured * conjureSymbol(const clang::Stmt * stmt, const clang::LocationContext * LCtx, clang::QualType type, unsigned int visitCount, const void * symbolTag = nullptr)
  • public const clang::ento::SymbolConjured * conjureSymbol(const clang::Expr * expr, const clang::LocationContext * LCtx, unsigned int visitCount, const void * symbolTag = nullptr)
  • public clang::ento::DefinedOrUnknownSVal conjureSymbolVal(const void * symbolTag, const clang::Expr * expr, const clang::LocationContext * LCtx, unsigned int count)
  • public clang::ento::DefinedOrUnknownSVal conjureSymbolVal(const clang::Stmt * stmt, const clang::LocationContext * LCtx, clang::QualType type, unsigned int visitCount)
  • public clang::ento::DefinedOrUnknownSVal conjureSymbolVal(const void * symbolTag, const clang::Expr * expr, const clang::LocationContext * LCtx, clang::QualType type, unsigned int count)
  • public clang::ento::SVal convertToArrayIndex(clang::ento::SVal val)
  • public clang::ento::SVal evalBinOp(clang::ento::ProgramStateRef state, BinaryOperator::Opcode op, clang::ento::SVal lhs, clang::ento::SVal rhs, clang::QualType type)
  • public virtual clang::ento::SVal evalBinOpLL(clang::ento::ProgramStateRef state, BinaryOperator::Opcode op, clang::ento::Loc lhs, clang::ento::Loc rhs, clang::QualType resultTy)
  • public virtual clang::ento::SVal evalBinOpLN(clang::ento::ProgramStateRef state, BinaryOperator::Opcode op, clang::ento::Loc lhs, clang::ento::NonLoc rhs, clang::QualType resultTy)
  • public virtual clang::ento::SVal evalBinOpNN(clang::ento::ProgramStateRef state, BinaryOperator::Opcode op, clang::ento::NonLoc lhs, clang::ento::NonLoc rhs, clang::QualType resultTy)
  • public clang::ento::SVal evalCast(clang::ento::SVal V, clang::QualType CastTy, clang::QualType OriginalTy)
  • public clang::ento::SVal evalComplement(clang::ento::NonLoc val)
  • public clang::ento::SVal evalEQ(clang::ento::ProgramStateRef state, clang::ento::SVal lhs, clang::ento::SVal rhs)
  • public clang::ento::DefinedOrUnknownSVal evalEQ(clang::ento::ProgramStateRef state, clang::ento::DefinedOrUnknownSVal lhs, clang::ento::DefinedOrUnknownSVal rhs)
  • public clang::ento::SVal evalIntegralCast(clang::ento::ProgramStateRef state, clang::ento::SVal val, clang::QualType castTy, clang::QualType originalType)
  • public clang::ento::SVal evalMinus(clang::ento::NonLoc val)
  • public clang::ento::SVal evalUnaryOp(clang::ento::ProgramStateRef state, UnaryOperator::Opcode opc, clang::ento::SVal operand, clang::QualType type)
  • public const clang::AnalyzerOptions & getAnalyzerOptions() const
  • public clang::QualType getArrayIndexType() const
  • public clang::ento::BasicValueFactory & getBasicValueFactory()
  • public const clang::ento::BasicValueFactory & getBasicValueFactory() const
  • public clang::ento::DefinedSVal getBlockPointer(const clang::BlockDecl * block, clang::CanQualType locTy, const clang::LocationContext * locContext, unsigned int blockCount)
  • public loc::MemRegionVal getCXXThis(const clang::CXXRecordDecl * D, const clang::StackFrameContext * SFC)
  • public loc::MemRegionVal getCXXThis(const clang::CXXMethodDecl * D, const clang::StackFrameContext * SFC)
  • public Optional<loc::MemRegionVal> getCastedMemRegionVal(const clang::ento::MemRegion * region, clang::QualType type)
  • public clang::QualType getConditionType() const
  • public clang::ento::DefinedOrUnknownSVal getConjuredHeapSymbolVal(const clang::Expr * E, const clang::LocationContext * LCtx, unsigned int Count)
  • public clang::ento::DefinedOrUnknownSVal getConjuredHeapSymbolVal(const clang::Expr * E, const clang::LocationContext * LCtx, clang::QualType type, unsigned int Count)
  • public Optional<clang::ento::SVal> getConstantVal(const clang::Expr * E)
  • public const clang::ASTContext & getContext() const
  • public clang::ASTContext & getContext()
  • public clang::ento::DefinedOrUnknownSVal getDerivedRegionValueSymbolVal(clang::ento::SymbolRef parentSymbol, const clang::ento::TypedValueRegion * region)
  • public clang::ento::DefinedSVal getFunctionPointer(const clang::FunctionDecl * func)
  • public virtual const llvm::APSInt * getKnownValue(clang::ento::ProgramStateRef state, clang::ento::SVal val)
  • public clang::ento::DefinedSVal getMemberPointer(const clang::NamedDecl * ND)
  • public clang::ento::DefinedSVal getMetadataSymbolVal(const void * symbolTag, const clang::ento::MemRegion * region, const clang::Expr * expr, clang::QualType type, const clang::LocationContext * LCtx, unsigned int count)
  • public const clang::ento::MemRegionManager & getRegionManager() const
  • public clang::ento::MemRegionManager & getRegionManager()
  • public clang::ento::DefinedOrUnknownSVal getRegionValueSymbolVal(const clang::ento::TypedValueRegion * region)
  • public clang::ento::ProgramStateManager & getStateManager()
  • public clang::ento::SymbolManager & getSymbolManager()
  • public const clang::ento::SymbolManager & getSymbolManager() const
  • public clang::ento::NonLoc makeArrayIndex(uint64_t idx)
  • public nonloc::ConcreteInt makeBoolVal(const clang::ObjCBoolLiteralExpr * boolean)
  • public nonloc::ConcreteInt makeBoolVal(const clang::CXXBoolLiteralExpr * boolean)
  • public clang::ento::NonLoc makeCompoundVal(clang::QualType type, llvm::ImmutableList<SVal> vals)
  • public loc::ConcreteInt makeIntLocVal(const llvm::APSInt & integer)
  • public clang::ento::NonLoc makeIntVal(uint64_t integer, bool isUnsigned)
  • public clang::ento::DefinedSVal makeIntVal(uint64_t integer, clang::QualType type)
  • public clang::ento::NonLoc makeIntVal(const llvm::APInt & integer, bool isUnsigned)
  • public nonloc::ConcreteInt makeIntVal(const llvm::APSInt & integer)
  • public nonloc::ConcreteInt makeIntVal(const clang::IntegerLiteral * integer)
  • public clang::ento::NonLoc makeIntValWithWidth(clang::QualType ptrType, uint64_t integer)
  • public clang::ento::NonLoc makeLazyCompoundVal(const clang::ento::StoreRef & store, const clang::ento::TypedValueRegion * region)
  • public loc::ConcreteInt makeLoc(const llvm::APSInt & integer)
  • public loc::GotoLabel makeLoc(const clang::AddrLabelExpr * expr)
  • public loc::MemRegionVal makeLoc(const clang::ento::MemRegion * region)
  • public loc::MemRegionVal makeLoc(clang::ento::SymbolRef sym)
  • public clang::ento::NonLoc makeLocAsInteger(clang::ento::Loc loc, unsigned int bits)
  • public nonloc::SymbolVal makeNonLoc(const clang::ento::SymExpr * lhs, BinaryOperator::Opcode op, const llvm::APSInt & rhs, clang::QualType type)
  • public nonloc::SymbolVal makeNonLoc(const llvm::APSInt & rhs, BinaryOperator::Opcode op, const clang::ento::SymExpr * lhs, clang::QualType type)
  • public nonloc::SymbolVal makeNonLoc(const clang::ento::SymExpr * lhs, BinaryOperator::Opcode op, const clang::ento::SymExpr * rhs, clang::QualType type)
  • public clang::ento::NonLoc makeNonLoc(const clang::ento::SymExpr * operand, UnaryOperator::Opcode op, clang::QualType type)
  • public nonloc::SymbolVal makeNonLoc(const clang::ento::SymExpr * operand, clang::QualType fromTy, clang::QualType toTy)
  • public loc::ConcreteInt makeNullWithType(clang::QualType type)
  • public clang::ento::NonLoc makePointerToMember(const clang::ento::PointerToMemberData * PTMD)
  • public clang::ento::NonLoc makePointerToMember(const clang::DeclaratorDecl * DD)
  • public clang::ento::SVal makeSymExprValNN(BinaryOperator::Opcode op, clang::ento::NonLoc lhs, clang::ento::NonLoc rhs, clang::QualType resultTy)
  • public clang::ento::DefinedSVal makeSymbolVal(clang::ento::SymbolRef Sym)
  • public nonloc::ConcreteInt makeTruthVal(bool b)
  • public nonloc::ConcreteInt makeTruthVal(bool b, clang::QualType type)
  • public clang::ento::NonLoc makeZeroArrayIndex()
  • public clang::ento::DefinedOrUnknownSVal makeZeroVal(clang::QualType type)
  • public virtual clang::ento::SVal simplifySVal(clang::ento::ProgramStateRef State, clang::ento::SVal Val)
  • public virtual ~SValBuilder()

Methods

SValBuilder(
    llvm::BumpPtrAllocator& alloc,
    clang::ASTContext& context,
    clang::ento::ProgramStateManager& stateMgr)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:79

Parameters

llvm::BumpPtrAllocator& alloc
clang::ASTContext& context
clang::ento::ProgramStateManager& stateMgr

virtual void anchor()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:54

clang::ento::ConditionTruthVal areEqual(
    clang::ento::ProgramStateRef state,
    clang::ento::SVal lhs,
    clang::ento::SVal rhs)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:129

Parameters

clang::ento::ProgramStateRef state
clang::ento::SVal lhs
clang::ento::SVal rhs

Returns

Whether values in \p lhs and \p rhs are equal at \p state.

const clang::ento::SymbolConjured* conjureSymbol(
    const clang::Stmt* stmt,
    const clang::LocationContext* LCtx,
    clang::QualType type,
    unsigned int visitCount,
    const void* symbolTag = nullptr)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:162

Parameters

const clang::Stmt* stmt
const clang::LocationContext* LCtx
clang::QualType type
unsigned int visitCount
const void* symbolTag = nullptr

const clang::ento::SymbolConjured* conjureSymbol(
    const clang::Expr* expr,
    const clang::LocationContext* LCtx,
    unsigned int visitCount,
    const void* symbolTag = nullptr)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:170

Parameters

const clang::Expr* expr
const clang::LocationContext* LCtx
unsigned int visitCount
const void* symbolTag = nullptr

clang::ento::DefinedOrUnknownSVal
conjureSymbolVal(
    const void* symbolTag,
    const clang::Expr* expr,
    const clang::LocationContext* LCtx,
    unsigned int count)

Description

Create a new symbol with a unique 'name'. We resort to conjured symbols when we cannot construct a derived symbol. The advantage of symbols derived/built from other symbols is that we preserve the relation between related(or even equivalent) expressions, so conjured symbols should be used sparingly.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:189

Parameters

const void* symbolTag
const clang::Expr* expr
const clang::LocationContext* LCtx
unsigned int count

clang::ento::DefinedOrUnknownSVal
conjureSymbolVal(
    const clang::Stmt* stmt,
    const clang::LocationContext* LCtx,
    clang::QualType type,
    unsigned int visitCount)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:198

Parameters

const clang::Stmt* stmt
const clang::LocationContext* LCtx
clang::QualType type
unsigned int visitCount

clang::ento::DefinedOrUnknownSVal
conjureSymbolVal(
    const void* symbolTag,
    const clang::Expr* expr,
    const clang::LocationContext* LCtx,
    clang::QualType type,
    unsigned int count)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:193

Parameters

const void* symbolTag
const clang::Expr* expr
const clang::LocationContext* LCtx
clang::QualType type
unsigned int count

clang::ento::SVal convertToArrayIndex(
    clang::ento::SVal val)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:267

Parameters

clang::ento::SVal val

clang::ento::SVal evalBinOp(
    clang::ento::ProgramStateRef state,
    BinaryOperator::Opcode op,
    clang::ento::SVal lhs,
    clang::ento::SVal rhs,
    clang::QualType type)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:125

Parameters

clang::ento::ProgramStateRef state
BinaryOperator::Opcode op
clang::ento::SVal lhs
clang::ento::SVal rhs
clang::QualType type

virtual clang::ento::SVal evalBinOpLL(
    clang::ento::ProgramStateRef state,
    BinaryOperator::Opcode op,
    clang::ento::Loc lhs,
    clang::ento::Loc rhs,
    clang::QualType resultTy)

Description

Create a new value which represents a binary expression with two memory location operands.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:100

Parameters

clang::ento::ProgramStateRef state
BinaryOperator::Opcode op
clang::ento::Loc lhs
clang::ento::Loc rhs
clang::QualType resultTy

virtual clang::ento::SVal evalBinOpLN(
    clang::ento::ProgramStateRef state,
    BinaryOperator::Opcode op,
    clang::ento::Loc lhs,
    clang::ento::NonLoc rhs,
    clang::QualType resultTy)

Description

Create a new value which represents a binary expression with a memory location and non-location operands. For example, this would be used to evaluate a pointer arithmetic operation.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:106

Parameters

clang::ento::ProgramStateRef state
BinaryOperator::Opcode op
clang::ento::Loc lhs
clang::ento::NonLoc rhs
clang::QualType resultTy

virtual clang::ento::SVal evalBinOpNN(
    clang::ento::ProgramStateRef state,
    BinaryOperator::Opcode op,
    clang::ento::NonLoc lhs,
    clang::ento::NonLoc rhs,
    clang::QualType resultTy)

Description

Create a new value which represents a binary expression with two non- location operands.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:95

Parameters

clang::ento::ProgramStateRef state
BinaryOperator::Opcode op
clang::ento::NonLoc lhs
clang::ento::NonLoc rhs
clang::QualType resultTy

clang::ento::SVal evalCast(
    clang::ento::SVal V,
    clang::QualType CastTy,
    clang::QualType OriginalTy)

Description

Cast a given SVal to another SVal using given QualType's.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:84

Parameters

clang::ento::SVal V
-- SVal that should be casted.
clang::QualType CastTy
-- QualType that V should be casted according to.
clang::QualType OriginalTy
-- QualType which is associated to V. It provides additional information about what type the cast performs from.

Returns

the most appropriate casted SVal. Note: Many cases don't use an exact OriginalTy. It can be extracted from SVal or the cast can performs unconditionaly. Always pass OriginalTy! It can be crucial in certain cases and generates different results. FIXME: If `OriginalTy.isNull()` is true, then cast performs based on CastTy only. This behavior is uncertain and should be improved.

clang::ento::SVal evalComplement(
    clang::ento::NonLoc val)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:91

Parameters

clang::ento::NonLoc val

clang::ento::SVal evalEQ(
    clang::ento::ProgramStateRef state,
    clang::ento::SVal lhs,
    clang::ento::SVal rhs)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:131

Parameters

clang::ento::ProgramStateRef state
clang::ento::SVal lhs
clang::ento::SVal rhs

clang::ento::DefinedOrUnknownSVal evalEQ(
    clang::ento::ProgramStateRef state,
    clang::ento::DefinedOrUnknownSVal lhs,
    clang::ento::DefinedOrUnknownSVal rhs)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:133

Parameters

clang::ento::ProgramStateRef state
clang::ento::DefinedOrUnknownSVal lhs
clang::ento::DefinedOrUnknownSVal rhs

clang::ento::SVal evalIntegralCast(
    clang::ento::ProgramStateRef state,
    clang::ento::SVal val,
    clang::QualType castTy,
    clang::QualType originalType)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:87

Parameters

clang::ento::ProgramStateRef state
clang::ento::SVal val
clang::QualType castTy
clang::QualType originalType

clang::ento::SVal evalMinus(
    clang::ento::NonLoc val)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:90

Parameters

clang::ento::NonLoc val

clang::ento::SVal evalUnaryOp(
    clang::ento::ProgramStateRef state,
    UnaryOperator::Opcode opc,
    clang::ento::SVal operand,
    clang::QualType type)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:122

Parameters

clang::ento::ProgramStateRef state
UnaryOperator::Opcode opc
clang::ento::SVal operand
clang::QualType type

const clang::AnalyzerOptions& getAnalyzerOptions()
    const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:158

clang::QualType getArrayIndexType() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:145

clang::ento::BasicValueFactory&
getBasicValueFactory()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:149

const clang::ento::BasicValueFactory&
getBasicValueFactory() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:150

clang::ento::DefinedSVal getBlockPointer(
    const clang::BlockDecl* block,
    clang::CanQualType locTy,
    const clang::LocationContext* locContext,
    unsigned int blockCount)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:231

Parameters

const clang::BlockDecl* block
clang::CanQualType locTy
const clang::LocationContext* locContext
unsigned int blockCount

loc::MemRegionVal getCXXThis(
    const clang::CXXRecordDecl* D,
    const clang::StackFrameContext* SFC)

Description

Return a memory region for the 'this' object reference.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:390

Parameters

const clang::CXXRecordDecl* D
const clang::StackFrameContext* SFC

loc::MemRegionVal getCXXThis(
    const clang::CXXMethodDecl* D,
    const clang::StackFrameContext* SFC)

Description

Return a memory region for the 'this' object reference.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:386

Parameters

const clang::CXXMethodDecl* D
const clang::StackFrameContext* SFC

Optional<loc::MemRegionVal> getCastedMemRegionVal(
    const clang::ento::MemRegion* region,
    clang::QualType type)

Description

Return MemRegionVal on success cast, otherwise return None.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:373

Parameters

const clang::ento::MemRegion* region
clang::QualType type

clang::QualType getConditionType() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:141

clang::ento::DefinedOrUnknownSVal
getConjuredHeapSymbolVal(
    const clang::Expr* E,
    const clang::LocationContext* LCtx,
    unsigned int Count)

Description

Conjure a symbol representing heap allocated memory region. Note, the expression should represent a location.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:206

Parameters

const clang::Expr* E
const clang::LocationContext* LCtx
unsigned int Count

clang::ento::DefinedOrUnknownSVal
getConjuredHeapSymbolVal(
    const clang::Expr* E,
    const clang::LocationContext* LCtx,
    clang::QualType type,
    unsigned int Count)

Description

Conjure a symbol representing heap allocated memory region. Note, now, the expression *doesn't* need to represent a location. But the type need to!

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:214

Parameters

const clang::Expr* E
const clang::LocationContext* LCtx
clang::QualType type
unsigned int Count

Optional<clang::ento::SVal> getConstantVal(
    const clang::Expr* E)

Description

Returns the value of \p E, if it can be determined in a non-path-sensitive manner. If \p E is not a constant or cannot be modeled, returns \c None.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:239

Parameters

const clang::Expr* E

const clang::ASTContext& getContext() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:137

clang::ASTContext& getContext()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:136

clang::ento::DefinedOrUnknownSVal
getDerivedRegionValueSymbolVal(
    clang::ento::SymbolRef parentSymbol,
    const clang::ento::TypedValueRegion* region)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:218

Parameters

clang::ento::SymbolRef parentSymbol
const clang::ento::TypedValueRegion* region

clang::ento::DefinedSVal getFunctionPointer(
    const clang::FunctionDecl* func)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:229

Parameters

const clang::FunctionDecl* func

virtual const llvm::APSInt* getKnownValue(
    clang::ento::ProgramStateRef state,
    clang::ento::SVal val)

Description

Evaluates a given SVal. If the SVal has only one possible (integer) value, that value is returned. Otherwise, returns NULL.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:111

Parameters

clang::ento::ProgramStateRef state
clang::ento::SVal val

clang::ento::DefinedSVal getMemberPointer(
    const clang::NamedDecl* ND)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:227

Parameters

const clang::NamedDecl* ND

clang::ento::DefinedSVal getMetadataSymbolVal(
    const void* symbolTag,
    const clang::ento::MemRegion* region,
    const clang::Expr* expr,
    clang::QualType type,
    const clang::LocationContext* LCtx,
    unsigned int count)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:221

Parameters

const void* symbolTag
const clang::ento::MemRegion* region
const clang::Expr* expr
clang::QualType type
const clang::LocationContext* LCtx
unsigned int count

const clang::ento::MemRegionManager&
getRegionManager() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:156

clang::ento::MemRegionManager& getRegionManager()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:155

clang::ento::DefinedOrUnknownSVal
getRegionValueSymbolVal(
    const clang::ento::TypedValueRegion* region)

Description

Make a unique symbol for value of region.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:181

Parameters

const clang::ento::TypedValueRegion* region

clang::ento::ProgramStateManager&
getStateManager()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:139

clang::ento::SymbolManager& getSymbolManager()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:152

const clang::ento::SymbolManager&
getSymbolManager() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:153

clang::ento::NonLoc makeArrayIndex(uint64_t idx)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:263

Parameters

uint64_t idx

nonloc::ConcreteInt makeBoolVal(
    const clang::ObjCBoolLiteralExpr* boolean)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:275

Parameters

const clang::ObjCBoolLiteralExpr* boolean

nonloc::ConcreteInt makeBoolVal(
    const clang::CXXBoolLiteralExpr* boolean)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:279

Parameters

const clang::CXXBoolLiteralExpr* boolean

clang::ento::NonLoc makeCompoundVal(
    clang::QualType type,
    llvm::ImmutableList<SVal> vals)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:241

Parameters

clang::QualType type
llvm::ImmutableList<SVal> vals

loc::ConcreteInt makeIntLocVal(
    const llvm::APSInt& integer)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:285

Parameters

const llvm::APSInt& integer

clang::ento::NonLoc makeIntVal(uint64_t integer,
                               bool isUnsigned)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:300

Parameters

uint64_t integer
bool isUnsigned

clang::ento::DefinedSVal makeIntVal(
    uint64_t integer,
    clang::QualType type)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:293

Parameters

uint64_t integer
clang::QualType type

clang::ento::NonLoc makeIntVal(
    const llvm::APInt& integer,
    bool isUnsigned)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:289

Parameters

const llvm::APInt& integer
bool isUnsigned

nonloc::ConcreteInt makeIntVal(
    const llvm::APSInt& integer)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:281

Parameters

const llvm::APSInt& integer

nonloc::ConcreteInt makeIntVal(
    const clang::IntegerLiteral* integer)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:269

Parameters

const clang::IntegerLiteral* integer

clang::ento::NonLoc makeIntValWithWidth(
    clang::QualType ptrType,
    uint64_t integer)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:304

Parameters

clang::QualType ptrType
uint64_t integer

clang::ento::NonLoc makeLazyCompoundVal(
    const clang::ento::StoreRef& store,
    const clang::ento::TypedValueRegion* region)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:245

Parameters

const clang::ento::StoreRef& store
const clang::ento::TypedValueRegion* region

loc::ConcreteInt makeLoc(
    const llvm::APSInt& integer)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:368

Parameters

const llvm::APSInt& integer

loc::GotoLabel makeLoc(
    const clang::AddrLabelExpr* expr)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:364

Parameters

const clang::AddrLabelExpr* expr

loc::MemRegionVal makeLoc(
    const clang::ento::MemRegion* region)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:360

Parameters

const clang::ento::MemRegion* region

loc::MemRegionVal makeLoc(
    clang::ento::SymbolRef sym)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:356

Parameters

clang::ento::SymbolRef sym

clang::ento::NonLoc makeLocAsInteger(
    clang::ento::Loc loc,
    unsigned int bits)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:308

Parameters

clang::ento::Loc loc
unsigned int bits

nonloc::SymbolVal makeNonLoc(
    const clang::ento::SymExpr* lhs,
    BinaryOperator::Opcode op,
    const llvm::APSInt& rhs,
    clang::QualType type)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:312

Parameters

const clang::ento::SymExpr* lhs
BinaryOperator::Opcode op
const llvm::APSInt& rhs
clang::QualType type

nonloc::SymbolVal makeNonLoc(
    const llvm::APSInt& rhs,
    BinaryOperator::Opcode op,
    const clang::ento::SymExpr* lhs,
    clang::QualType type)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:315

Parameters

const llvm::APSInt& rhs
BinaryOperator::Opcode op
const clang::ento::SymExpr* lhs
clang::QualType type

nonloc::SymbolVal makeNonLoc(
    const clang::ento::SymExpr* lhs,
    BinaryOperator::Opcode op,
    const clang::ento::SymExpr* rhs,
    clang::QualType type)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:319

Parameters

const clang::ento::SymExpr* lhs
BinaryOperator::Opcode op
const clang::ento::SymExpr* rhs
clang::QualType type

clang::ento::NonLoc makeNonLoc(
    const clang::ento::SymExpr* operand,
    UnaryOperator::Opcode op,
    clang::QualType type)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:322

Parameters

const clang::ento::SymExpr* operand
UnaryOperator::Opcode op
clang::QualType type

nonloc::SymbolVal makeNonLoc(
    const clang::ento::SymExpr* operand,
    clang::QualType fromTy,
    clang::QualType toTy)

Description

Create a NonLoc value for cast.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:326

Parameters

const clang::ento::SymExpr* operand
clang::QualType fromTy
clang::QualType toTy

loc::ConcreteInt makeNullWithType(
    clang::QualType type)

Description

Create NULL pointer, with proper pointer bit-width for given address space.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:340

Parameters

clang::QualType type
pointer type.

clang::ento::NonLoc makePointerToMember(
    const clang::ento::PointerToMemberData* PTMD)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:255

Parameters

const clang::ento::PointerToMemberData* PTMD

clang::ento::NonLoc makePointerToMember(
    const clang::DeclaratorDecl* DD)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:251

Parameters

const clang::DeclaratorDecl* DD

clang::ento::SVal makeSymExprValNN(
    BinaryOperator::Opcode op,
    clang::ento::NonLoc lhs,
    clang::ento::NonLoc rhs,
    clang::QualType resultTy)

Description

Constructs a symbolic expression for two non-location values.

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

Parameters

BinaryOperator::Opcode op
clang::ento::NonLoc lhs
clang::ento::NonLoc rhs
clang::QualType resultTy

clang::ento::DefinedSVal makeSymbolVal(
    clang::ento::SymbolRef Sym)

Description

Make an SVal that represents the given symbol. This follows the convention of representing Loc-type symbols (symbolic pointers and references) as Loc values wrapping the symbol rather than as plain symbol values.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:379

Parameters

clang::ento::SymbolRef Sym

nonloc::ConcreteInt makeTruthVal(bool b)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:333

Parameters

bool b

nonloc::ConcreteInt makeTruthVal(
    bool b,
    clang::QualType type)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:329

Parameters

bool b
clang::QualType type

clang::ento::NonLoc makeZeroArrayIndex()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:259

clang::ento::DefinedOrUnknownSVal makeZeroVal(
    clang::QualType type)

Description

Construct an SVal representing '0' for the specified type.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:178

Parameters

clang::QualType type

virtual clang::ento::SVal simplifySVal(
    clang::ento::ProgramStateRef State,
    clang::ento::SVal Val)

Description

Simplify symbolic expressions within a given SVal. Return an SVal that represents the same value, but is hopefully easier to work with than the original SVal.

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

Parameters

clang::ento::ProgramStateRef State
clang::ento::SVal Val

virtual ~SValBuilder()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:82