21 #include "llvm/Support/Casting.h" 22 #include "llvm/Support/raw_ostream.h" 38 if (
const auto *TR = dyn_cast<TypedRegion>(Reg))
41 if (
const auto *SR = dyn_cast<SymbolicRegion>(Reg)) {
58 const char *NL,
unsigned int Space,
bool IsDot) {
59 Indent(Out, Space, IsDot) <<
"\"dynamic_types\": ";
69 for (DynamicTypeMapTy::iterator I = DTM.begin(); I != DTM.end(); ++I) {
72 Out <<
"{ \"region\": \"" << MR <<
"\", \"dyn_type\": ";
75 <<
"\", \"sub_classable\": " 82 if (std::next(I) != DTM.end())
88 Indent(Out, Space, IsDot) <<
"]," << NL;
MemRegion - The root abstract class for all memory regions.
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee...
bool isValid() const
Return false if no dynamic type info is available.
The GDM component containing the dynamic type info.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
QualType getType() const
Returns the currently inferred upper bound on the runtime type.
virtual QualType getType() const =0
bool canBeASubClass() const
Returns false if the type information is precise (the type T is the only type in the lattice)...
Stores the currently inferred strictest bound on the runtime type of a region in a given state along ...
ProgramStateRef setDynamicTypeInfo(ProgramStateRef State, const MemRegion *Reg, DynamicTypeInfo NewTy)
Set dynamic type information of the region; return the new state.
Dataflow Directional Tag Classes.
llvm::ImmutableMap< const MemRegion *, DynamicTypeInfo > DynamicTypeMapTy
DynamicTypeInfo getDynamicTypeInfo(ProgramStateRef State, const MemRegion *Reg)
Get dynamic type information for a region.
static std::string getAsString(SplitQualType split, const PrintingPolicy &Policy)
const MemRegion * StripCasts(bool StripBaseAndDerivedCasts=true) const
void printDynamicTypeInfoJson(raw_ostream &Out, ProgramStateRef State, const char *NL="\, unsigned int Space=0, bool IsDot=false)
raw_ostream & Indent(raw_ostream &Out, const unsigned int Space, bool IsDot)