18 #include "llvm/Support/Casting.h" 22 using namespace clang;
27 while (
const ArrayType *vt = dyn_cast<ArrayType>(t)) {
29 if (vat->getSizeExpr())
32 t = vt->getElementType().getTypePtr();
76 if (
VarDecl* VD = dyn_cast<VarDecl>(D)) {
87 FindVA(TD->getUnderlyingType().getTypePtr())) {
93 if (ECD->getInitExpr())
112 assert(VAPtr->SizeExpr);
113 return const_cast<Stmt*&
>(VAPtr->SizeExpr);
117 VarDecl* VD = cast<VarDecl>(*DGI);
Stmt - This represents one statement.
EnumConstantDecl - An instance of this object exists for each enum constant that is defined...
C Language Family Type Representation.
Decl - This represents one declaration (or definition), e.g.
The base class of the type hierarchy.
Represents an array type, per C99 6.7.5.2 - Array Declarators.
QualType getElementType() const
const VariableArrayType * getVAPtr() const
VarDecl - An instance of this class is created to represent a variable declaration or definition...
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
void NextDecl(bool ImmediateAdvance=true)
const Type * getTypePtr() const
Retrieves a pointer to the underlying (unqualified) type.
Stmt ** getInitAddress()
Retrieve the address of the initializer expression.
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
bool inSizeOfTypeVA() const
Stmt *& GetDeclExpr() const
Base class for declarations which introduce a typedef-name.
Dataflow Directional Tag Classes.
static const VariableArrayType * FindVA(const Type *t)
void setVAPtr(const VariableArrayType *P)
Represents a C array with a specified size that is not an integer-constant-expression.