16 #ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_MEMREGION_H
17 #define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_MEMREGION_H
26 #include "llvm/ADT/FoldingSet.h"
27 #include "llvm/Support/Allocator.h"
28 #include "llvm/Support/ErrorHandling.h"
33 class LocationContext;
34 class StackFrameContext;
39 class MemRegionManager;
134 virtual void Profile(llvm::FoldingSetNodeID&
ID)
const = 0;
187 template<
typename RegionTy>
const RegionTy*
getAs()
const;
207 void Profile(llvm::FoldingSetNodeID &
ID)
const override;
232 virtual void anchor();
257 void Profile(llvm::FoldingSetNodeID &
ID)
const override;
344 virtual void anchor();
359 virtual void anchor();
385 void Profile(llvm::FoldingSetNodeID &
ID)
const override;
395 virtual void anchor();
410 virtual void anchor();
428 virtual void anchor();
475 void Profile(llvm::FoldingSetNodeID&
ID)
const override;
562 assert(isa<ObjCMethodDecl>(fd) || isa<FunctionDecl>(fd));
567 if (
const FunctionDecl *D = dyn_cast<FunctionDecl>(FD)) {
571 assert(isa<ObjCMethodDecl>(FD));
572 assert(
false &&
"Getting the type of ObjCMethod is not supported yet");
585 void Profile(llvm::FoldingSetNodeID&
ID)
const override;
626 void Profile(llvm::FoldingSetNodeID&
ID)
const override;
648 void *ReferencedVars;
655 ReferencedVars(nullptr), OriginalVars(nullptr) {}
670 : R(r), OriginalR(originalR) {}
673 return cast<VarRegion>(*R);
676 return cast<VarRegion>(*OriginalR);
680 assert((R ==
nullptr) == (I.R ==
nullptr));
684 assert((R ==
nullptr) == (I.R ==
nullptr));
703 void Profile(llvm::FoldingSetNodeID&
ID)
const override;
713 void LazyInitializeReferencedVars();
714 std::pair<const VarRegion *, const VarRegion *>
715 getCaptureRegions(
const VarDecl *VD);
739 void Profile(llvm::FoldingSetNodeID&
ID)
const override;
777 void Profile(llvm::FoldingSetNodeID&
ID)
const override {
811 void Profile(llvm::FoldingSetNodeID&
ID)
const override {
833 static void ProfileRegion(llvm::FoldingSetNodeID&
ID,
843 void Profile(llvm::FoldingSetNodeID&
ID)
const override;
866 void Profile(llvm::FoldingSetNodeID&
ID)
const override;
881 static void ProfileRegion(llvm::FoldingSetNodeID&
ID,
const VarDecl *VD,
886 void Profile(llvm::FoldingSetNodeID&
ID)
const override;
918 static void ProfileRegion(llvm::FoldingSetNodeID &
ID,
922 void Profile(llvm::FoldingSetNodeID &
ID)
const override;
978 static void ProfileRegion(llvm::FoldingSetNodeID&
ID,
const ObjCIvarDecl *ivd,
1008 : Region(reg),
Offset(offset) {}
1028 ElementType(elementType), Index(Idx) {
1031 "The index must be signed");
1034 static void ProfileRegion(llvm::FoldingSetNodeID&
ID,
QualType elementType,
1053 void Profile(llvm::FoldingSetNodeID&
ID)
const override;
1069 static void ProfileRegion(llvm::FoldingSetNodeID &
ID,
1081 void Profile(llvm::FoldingSetNodeID &
ID)
const override;
1093 llvm::PointerIntPair<const CXXRecordDecl *, 1, bool> Data;
1099 static void ProfileRegion(llvm::FoldingSetNodeID &
ID,
const CXXRecordDecl *RD,
1110 void Profile(llvm::FoldingSetNodeID &
ID)
const override;
1121 template<
typename RegionTy>
1123 if (
const RegionTy* RT = dyn_cast<RegionTy>(
this))
1135 llvm::BumpPtrAllocator& A;
1136 llvm::FoldingSet<MemRegion> Regions;
1143 llvm::DenseMap<const StackFrameContext *, StackLocalsSpaceRegion *>
1144 StackLocalsSpaceRegions;
1145 llvm::DenseMap<const StackFrameContext *, StackArgumentsSpaceRegion *>
1146 StackArgumentsSpaceRegions;
1147 llvm::DenseMap<const CodeTextRegion *, StaticGlobalSpaceRegion *>
1148 StaticsGlobalSpaceRegions;
1156 : C(c), A(a), InternalGlobals(nullptr), SystemGlobals(nullptr),
1157 ImmutableGlobals(nullptr), heap(nullptr), unknown(nullptr),
1287 unsigned blockCount);
1295 template <
typename RegionTy,
typename A1>
1296 RegionTy* getRegion(
const A1 a1);
1298 template <
typename RegionTy,
typename A1>
1299 RegionTy* getSubRegion(
const A1 a1,
const MemRegion* superRegion);
1301 template <
typename RegionTy,
typename A1,
typename A2>
1302 RegionTy* getRegion(
const A1 a1,
const A2 a2);
1304 template <
typename RegionTy,
typename A1,
typename A2>
1305 RegionTy* getSubRegion(
const A1 a1,
const A2 a2,
1308 template <
typename RegionTy,
typename A1,
typename A2,
typename A3>
1309 RegionTy* getSubRegion(
const A1 a1,
const A2 a2,
const A3 a3,
1312 template <
typename REG>
1313 const REG* LazyAllocate(REG*& region);
1315 template <
typename REG,
typename ARG>
1316 const REG* LazyAllocate(REG*& region, ARG a);
1333 typedef unsigned char StorageTypeForKinds;
1334 llvm::DenseMap<const MemRegion *, StorageTypeForKinds> MRTraitsMap;
1335 llvm::DenseMap<SymbolRef, StorageTypeForKinds> SymTraitsMap;
1337 typedef llvm::DenseMap<const MemRegion *, StorageTypeForKinds>::const_iterator
1338 const_region_iterator;
1339 typedef llvm::DenseMap<SymbolRef, StorageTypeForKinds>::const_iterator
1340 const_symbol_iterator;
Suppress pointer-escaping of a region.
bool hasStackStorage() const
RegionOffset(const MemRegion *r, int64_t off)
bool isBoundable() const override
Defines the clang::ASTContext interface.
bool hasTrait(SymbolRef Sym, InvalidationKinds IK)
void dumpToStream(raw_ostream &os) const override
FunctionDecl - An instance of this class is created to represent a function declaration or definition...
TypedValueRegion - An abstract class representing regions having a typed value.
static bool classof(const MemRegion *R)
CompoundLiteralRegion - A memory region representing a compound literal.
QualType getValueType() const override
PointerType - C99 6.7.5.1 - Pointer Declarators.
A (possibly-)qualified type.
MemRegion - The root abstract class for all memory regions.
virtual DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const
getExtent - Returns the size of the region in bytes.
const FieldRegion * getFieldRegion(const FieldDecl *fd, const MemRegion *superRegion)
getFieldRegion - Retrieve or create the memory region associated with a specified FieldDecl...
virtual bool canPrintPretty() const
Returns true if this region can be printed in a user-friendly way.
SubRegion(const MemRegion *sReg, Kind k)
const Decl * getDecl() const
const CodeTextRegion * getCodeRegion() const
Information about invalidation for a particular region/symbol.
MemRegionManager * getMemRegionManager() const override
const StackFrameContext * getStackFrame() const
bool canPrintPrettyAsExpr() const override
Returns true if this region's textual representation can be used as part of a larger expression...
static void ProfileRegion(llvm::FoldingSetNodeID &ID, const FieldDecl *FD, const MemRegion *superRegion)
bool hasGlobalsOrParametersStorage() const
BlockCodeRegion - A region that represents code texts of blocks (closures).
Decl - This represents one declaration (or definition), e.g.
virtual QualType getValueType() const =0
virtual bool isBoundable() const
void dumpToStream(raw_ostream &os) const override
const StringRegion * getStringRegion(const StringLiteral *Str)
static bool classof(const MemRegion *R)
static bool classof(const MemRegion *R)
const RegionTy * getAs() const
const GlobalsSpaceRegion * getGlobalsRegion(MemRegion::Kind K=MemRegion::GlobalInternalSpaceRegionKind, const CodeTextRegion *R=nullptr)
getGlobalsRegion - Retrieve the memory region associated with global variables.
QualType getLocationType() const override
CharUnits getOffset() const
MemSpaceRegion - A memory region that represents a "memory space"; for example, the set of global var...
static bool classof(const MemRegion *region)
static void ProfileRegion(llvm::FoldingSetNodeID &ID, const NamedDecl *FD, const MemRegion *)
AnalysisDeclContext * getAnalysisDeclContext() const
static bool classof(const MemRegion *R)
Value representing integer constant.
AllocaRegion - A region that represents an untyped blob of bytes created by a call to 'alloca'...
static bool classof(const MemRegion *R)
CodeSpaceRegion - The memory space that holds the executable code of functions and blocks...
const StackArgumentsSpaceRegion * getStackArgumentsRegion(const StackFrameContext *STC)
getStackArgumentsRegion - Retrieve the memory region associated with function/method arguments of the...
ASTContext & getContext()
VarDecl - An instance of this class is created to represent a variable declaration or definition...
void printPretty(raw_ostream &os) const override
Print the region for use in diagnostics.
referenced_vars_iterator referenced_vars_begin() const
CompoundLiteralExpr - [C99 6.5.2.5].
void Profile(llvm::FoldingSetNodeID &ID) const override
const Expr * getExpr() const
void setTrait(SymbolRef Sym, InvalidationKinds IK)
QualType getElementType() const
void Profile(llvm::FoldingSetNodeID &ID) const override
std::string getString() const
Get a string representation of a region for debug use.
const ObjCStringRegion * getObjCStringRegion(const ObjCStringLiteral *Str)
const MemRegion * getBaseRegion() const
referenced_vars_iterator referenced_vars_end() const
CXXThisRegion - Represents the region for the implicit 'this' parameter in a call to a C++ method...
const MemSpaceRegion * getMemorySpace() const
const BlockDecl * getDecl() const
DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override
getExtent - Returns the size of the region in bytes.
AllocaRegion(const Expr *ex, unsigned cnt, const MemRegion *superRegion)
GlobalsSpaceRegion(MemRegionManager *mgr, Kind k)
The region containing globals which can be modified by calls to "internally" defined functions - (for...
const HeapSpaceRegion * getHeapRegion()
getHeapRegion - Retrieve the memory region associated with the generic "heap".
The region associated with an ObjCStringLiteral.
void Profile(llvm::FoldingSetNodeID &ID) const override
Represents a class type in Objective C.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
FieldDecl - An instance of this class is created by Sema::ActOnField to represent a member of a struc...
AnalysisDeclContext contains the context data for the function or method under analysis.
const MemRegion * getRegion() const
bool hasStackParametersStorage() const
const StackLocalsSpaceRegion * getStackLocalsRegion(const StackFrameContext *STC)
getStackLocalsRegion - Retrieve the memory region associated with the specified stack frame...
const ObjCIvarRegion * getObjCIvarRegion(const ObjCIvarDecl *ivd, const MemRegion *superRegion)
getObjCIvarRegion - Retrieve or create the memory region associated with a specified Objective-c inst...
QualType getLocationType() const override
void Profile(llvm::FoldingSetNodeID &ID) const override
const CXXBaseObjectRegion * getCXXBaseObjectRegionWithSuper(const CXXBaseObjectRegion *baseReg, const MemRegion *superRegion)
Create a CXXBaseObjectRegion with the same CXXRecordDecl but a different super region.
static CharUnits Zero()
Zero - Construct a CharUnits quantity of zero.
const CXXRecordDecl * getDecl() const
void printPrettyAsExpr(raw_ostream &os) const override
Print the region as expression.
QualType getValueType() const override
bool isBoundable() const override
The region containing globals which are considered not to be modified or point to data which could be...
const SymbolicRegion * getSymbolicRegion(SymbolRef Sym)
Retrieve or create a "symbolic" memory region.
void Profile(llvm::FoldingSetNodeID &ID) const override
static bool classof(const MemRegion *R)
const VarDecl * getDecl() const
RegionRawOffset getAsArrayOffset() const
Compute the offset within the array. The array might also be a subobject.
CodeTextRegion(const MemRegion *sreg, Kind k)
ObjCStringRegion(const ObjCStringLiteral *str, const MemRegion *sreg)
BlockDataRegion - A region that represents a block instance.
const AllocaRegion * getAllocaRegion(const Expr *Ex, unsigned Cnt, const LocationContext *LC)
getAllocaRegion - Retrieve a region associated with a call to alloca().
const SymbolicRegion * getSymbolicBase() const
If this is a symbolic region, returns the region.
static bool classof(const MemRegion *R)
const ObjCIvarDecl * getDecl() const
const UnknownSpaceRegion * getUnknownRegion()
getUnknownRegion - Retrieve the memory region associated with unknown memory space.
CharUnits - This is an opaque type for sizes expressed in character units.
FunctionCodeRegion(const NamedDecl *fd, const MemRegion *sreg)
void dumpToStream(raw_ostream &os) const override
const StringLiteral * getStringLiteral() const
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
QualType getValueType() const override
referenced_vars_iterator(const MemRegion *const *r, const MemRegion *const *originalR)
SymbolRef getSymbol() const
SymbolicRegion(const SymbolRef s, const MemRegion *sreg)
void Profile(llvm::FoldingSetNodeID &ID) const override
void Profile(llvm::FoldingSetNodeID &ID) const override
void dumpToStream(raw_ostream &os) const override
static bool classof(const MemRegion *R)
static bool classof(const MemRegion *R)
ObjCStringLiteral, used for Objective-C string literals i.e.
void Profile(llvm::FoldingSetNodeID &ID) const override
static bool classof(const MemRegion *R)
void dumpToStream(raw_ostream &os) const override
void dumpToStream(raw_ostream &os) const override
bool operator==(const referenced_vars_iterator &I) const
void dumpToStream(raw_ostream &os) const override
static void ProfileRegion(llvm::FoldingSetNodeID &ID, const ObjCStringLiteral *Str, const MemRegion *superRegion)
QualType getValueType() const override
detail::InMemoryDirectory::const_iterator I
Represent a region's offset within the top level base region.
virtual void printPrettyAsExpr(raw_ostream &os) const
Print the region as expression.
void Profile(llvm::FoldingSetNodeID &ID) const override
static void ProfileRegion(llvm::FoldingSetNodeID &ID, const Decl *D, const MemRegion *superRegion, Kind k)
bool canPrintPretty() const override
Returns true if this region can be printed in a user-friendly way.
const BlockCodeRegion * getBlockCodeRegion(const BlockDecl *BD, CanQualType locTy, AnalysisDeclContext *AC)
const CXXBaseObjectRegion * getCXXBaseObjectRegion(const CXXRecordDecl *BaseClass, const MemRegion *Super, bool IsVirtual)
Create a CXXBaseObjectRegion with the given base class for region Super.
const MemRegion * getSuperRegion() const
static bool classof(const MemRegion *R)
void dumpToStream(raw_ostream &os) const override
const CodeSpaceRegion * getCodeRegion()
const StackFrameContext * getStackFrame() const
QualType getValueType() const override
DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override
getExtent - Returns the size of the region in bytes.
When applied to a MemSpaceRegion, indicates the entire memory space should be invalidated.
const Expr * getExpr() const
const MemRegion * StripCasts(bool StripBaseCasts=true) const
DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override
getExtent - Returns the size of the region in bytes.
ID
Defines the set of possible language-specific address spaces.
static bool classof(const MemRegion *R)
const VarRegion * getOriginalRegion(const VarRegion *VR) const
Return the original region for a captured region, if one exists.
SymbolicRegion - A special, "non-concrete" region.
QualType getDesugaredLocationType(ASTContext &Context) const
bool canPrintPrettyAsExpr() const override
Returns true if this region's textual representation can be used as part of a larger expression...
const Type * getTypePtrOrNull() const
BlockDecl - This represents a block literal declaration, which is like an unnamed FunctionDecl...
Expr - This represents one expression.
void printPrettyAsExpr(raw_ostream &os) const override
Print the region as expression.
TypedValueRegion(const MemRegion *sReg, Kind k)
virtual bool canPrintPrettyAsExpr() const
Returns true if this region's textual representation can be used as part of a larger expression...
bool canPrintPrettyAsExpr() const override
Returns true if this region's textual representation can be used as part of a larger expression...
const VarRegion * getCapturedRegion() const
QualType getDesugaredValueType(ASTContext &Context) const
DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override
getExtent - Returns the size of the region in bytes.
const ElementRegion * getElementRegion(QualType elementType, NonLoc Idx, const MemRegion *superRegion, ASTContext &Ctx)
getElementRegion - Retrieve the memory region associated with the associated element type...
bool hasSymbolicOffset() const
void dumpToStream(raw_ostream &os) const override
Optional< T > getAs() const
Convert to the specified SVal type, returning None if this SVal is not of the desired type...
static const int64_t Symbolic
const ElementRegion * getElementRegionWithSuper(const ElementRegion *ER, const MemRegion *superRegion)
llvm::BumpPtrAllocator & getAllocator()
static bool classof(const MemRegion *R)
QualType getDesugaredType(const ASTContext &Context) const
Return the specified type with any "sugar" removed from the type.
void Profile(llvm::FoldingSetNodeID &ID) const override
StringRegion(const StringLiteral *str, const MemRegion *sreg)
static bool classof(const MemRegion *R)
static bool classof(const MemRegion *R)
static bool classof(const MemRegion *R)
static bool classof(const MemRegion *R)
TypedRegion(const MemRegion *sReg, Kind k)
The region of the static variables within the current CodeTextRegion scope.
static void ProfileRegion(llvm::FoldingSetNodeID &, const BlockCodeRegion *, const LocationContext *, unsigned, const MemRegion *)
The region for all the non-static global variables.
void dumpToStream(raw_ostream &os) const override
static bool classof(const MemRegion *R)
bool operator!=(const referenced_vars_iterator &I) const
QualType getValueType() const override
static bool classof(const MemRegion *R)
const ObjCStringLiteral * getObjCStringLiteral() const
FunctionCodeRegion - A region that represents code texts of function.
ASTContext & getContext() const
virtual void dumpToStream(raw_ostream &os) const
bool isBoundable() const override
static bool classof(const MemRegion *R)
const FieldDecl * getDecl() const
void dumpToStream(raw_ostream &os) const override
const CXXTempObjectRegion * getCXXTempObjectRegion(Expr const *Ex, LocationContext const *LC)
bool isSubRegionOf(const MemRegion *R) const override
Check if the region is a subregion of the given region.
void dumpToStream(raw_ostream &os) const override
void dumpToStream(raw_ostream &os) const override
void printPrettyAsExpr(raw_ostream &os) const override
Print the region as expression.
const VarRegion * getOriginalRegion() const
SVal - This represents a symbolic expression, which can be either an L-value or an R-value...
void dumpToStream(raw_ostream &os) const override
void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Ctx)
bool isBoundable() const override
DefinedOrUnknownSVal getExtent(SValBuilder &svalBuilder) const override
getExtent - Returns the size of the region in bytes.
virtual void printPretty(raw_ostream &os) const
Print the region for use in diagnostics.
const CompoundLiteralRegion * getCompoundLiteralRegion(const CompoundLiteralExpr *CL, const LocationContext *LC)
getCompoundLiteralRegion - Retrieve the region associated with a given CompoundLiteral.
void Profile(llvm::FoldingSetNodeID &ID) const override
QualType getLocationType() const override
static bool classof(const MemRegion *R)
void dumpToStream(raw_ostream &os) const override
Tells that a region's contents is not changed.
static bool classof(const MemRegion *R)
const CXXThisRegion * getCXXThisRegion(QualType thisPointerTy, const LocationContext *LC)
getCXXThisRegion - Retrieve the [artificial] region associated with the parameter 'this'...
bool isBoundable() const override
RegionOffset getAsOffset() const
Compute the offset within the top level memory object.
static bool classof(const MemRegion *R)
const SymbolicRegion * getSymbolicHeapRegion(SymbolRef sym)
Return a unique symbolic region belonging to heap memory space.
static void ProfileRegion(llvm::FoldingSetNodeID &ID, const BlockDecl *BD, CanQualType, const AnalysisDeclContext *, const MemRegion *)
QualType getValueType() const override
static void ProfileRegion(llvm::FoldingSetNodeID &ID, const Expr *Ex, unsigned Cnt, const MemRegion *superRegion)
QualType getValueType() const override
const NamedDecl * getDecl() const
const VarRegion * getVarRegion(const VarDecl *D, const LocationContext *LC)
getVarRegion - Retrieve or create the memory region associated with a specified VarDecl and LocationC...
InvalidationKinds
Describes different invalidation traits.
const BlockDecl * getDecl() const
static void ProfileRegion(llvm::FoldingSetNodeID &ID, const StringLiteral *Str, const MemRegion *superRegion)
QualType getPointerType(QualType T) const
Return the uniqued reference to the type for a pointer to the specified type.
bool isBoundable() const override
QualType getObjCObjectPointerType(QualType OIT) const
Return a ObjCObjectPointerType type for the given ObjCObjectType.
virtual void Profile(llvm::FoldingSetNodeID &ID) const =0
detail::InMemoryDirectory::const_iterator E
void Profile(llvm::FoldingSetNodeID &ID) const override
QualType getLocationType() const override
static bool classof(const MemRegion *R)
void dumpToStream(raw_ostream &os) const override
const FunctionCodeRegion * getFunctionCodeRegion(const NamedDecl *FD)
const CXXTempObjectRegion * getCXXStaticTempObjectRegion(const Expr *Ex)
Create a CXXTempObjectRegion for temporaries which are lifetime-extended by static references...
void dumpToStream(raw_ostream &os) const override
static bool classof(const MemRegion *R)
virtual MemRegionManager * getMemRegionManager() const =0
void dumpToStream(raw_ostream &os) const override
static bool classof(const MemRegion *R)
bool isBoundable() const override
const T * getAs() const
Member-template getAs<specific type>'.
SubRegion - A region that subsets another larger region.
The region containing globals which are defined in system/external headers and are considered modifia...
const FieldRegion * getFieldRegionWithSuper(const FieldRegion *FR, const MemRegion *superRegion)
int64_t getOffset() const
StackSpaceRegion(MemRegionManager *mgr, Kind k, const StackFrameContext *sfc)
const CompoundLiteralExpr * getLiteralExpr() const
referenced_vars_iterator & operator++()
static raw_ostream & operator<<(raw_ostream &os, const clang::ento::MemRegion *R)
const BlockDataRegion * getBlockDataRegion(const BlockCodeRegion *bc, const LocationContext *lc, unsigned blockCount)
getBlockDataRegion - Get the memory region associated with an instance of a block.
MemRegionManager * getMemRegionManager() const override
MemSpaceRegion(MemRegionManager *mgr, Kind k)
void Profile(llvm::FoldingSetNodeID &ID) const override
void Profile(llvm::FoldingSetNodeID &ID) const override
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
bool canPrintPrettyAsExpr() const override
Returns true if this region's textual representation can be used as part of a larger expression...
void dumpToStream(raw_ostream &os) const
static void ProfileRegion(llvm::FoldingSetNodeID &ID, SymbolRef sym, const MemRegion *superRegion)
Represents a C++ struct/union/class.
void dumpToStream(raw_ostream &os) const override
void printPrettyAsExpr(raw_ostream &os) const override
Print the region as expression.
static bool classof(const MemRegion *R)
void Profile(llvm::FoldingSetNodeID &ID) const override
ObjCIvarDecl - Represents an ObjC instance variable.
const BlockCodeRegion * getCodeRegion() const
QualType getValueType() const override
static bool classof(const MemRegion *R)
static bool classof(const MemRegion *R)
DeclRegion(const Decl *d, const MemRegion *sReg, Kind k)
unsigned kind
All of the diagnostics that can be emitted by the frontend.
StringLiteral - This represents a string literal expression, e.g.
void dumpToStream(raw_ostream &os) const override
StringRegion - Region associated with a StringLiteral.
ElementRegin is used to represent both array elements and casts.
QualType getValueType() const override
MemRegionManager(ASTContext &c, llvm::BumpPtrAllocator &a)
const MemRegion * getRegion() const
virtual bool isSubRegionOf(const MemRegion *R) const
Check if the region is a subregion of the given region.
void dumpToStream(raw_ostream &os) const override
bool hasStackNonParametersStorage() const
NamedDecl - This represents a decl with a name.
static bool classof(const MemRegion *R)
const MemRegion * superRegion
const llvm::APSInt & getValue() const
T castAs() const
Convert to the specified SVal type, asserting that this SVal is of the desired type.
void dumpToStream(raw_ostream &os) const override
static bool classof(const MemRegion *R)
bool isBoundable() const override
void dumpToStream(raw_ostream &os) const override
NonStaticGlobalSpaceRegion(MemRegionManager *mgr, Kind k)
TypedRegion - An abstract class representing regions that are typed.
static bool classof(const MemRegion *R)
void dumpToStream(raw_ostream &os) const override
virtual QualType getLocationType() const =0