clang API Documentation
#include <Type.h>
Public Member Functions | |
const llvm::APInt & | getSize () const |
bool | isSugared () const |
QualType | desugar () const |
void | Profile (llvm::FoldingSetNodeID &ID) |
Static Public Member Functions | |
static unsigned | getNumAddressingBits (ASTContext &Context, QualType ElementType, const llvm::APInt &NumElements) |
Determine the number of bits required to address a member of. | |
static unsigned | getMaxSizeBits (ASTContext &Context) |
Determine the maximum number of active bits that an array's size can require, which limits the maximum size of the array. | |
static void | Profile (llvm::FoldingSetNodeID &ID, QualType ET, const llvm::APInt &ArraySize, ArraySizeModifier SizeMod, unsigned TypeQuals) |
static bool | classof (const Type *T) |
Protected Member Functions | |
ConstantArrayType (TypeClass tc, QualType et, QualType can, const llvm::APInt &size, ArraySizeModifier sm, unsigned tq) | |
Friends | |
class | ASTContext |
ConstantArrayType - This class represents the canonical version of C arrays with a specified constant size. For example, the canonical type for 'int A[4 + 4*100]' is a ConstantArrayType where the element type is 'int' and the size is 404.
clang::ConstantArrayType::ConstantArrayType | ( | TypeClass | tc, |
QualType | et, | ||
QualType | can, | ||
const llvm::APInt & | size, | ||
ArraySizeModifier | sm, | ||
unsigned | tq | ||
) | [inline, protected] |
static bool clang::ConstantArrayType::classof | ( | const Type * | T | ) | [inline, static] |
Reimplemented from clang::ArrayType.
Definition at line 2333 of file Type.h.
References clang::Type::getTypeClass().
QualType clang::ConstantArrayType::desugar | ( | ) | const [inline] |
unsigned ConstantArrayType::getMaxSizeBits | ( | ASTContext & | Context | ) | [static] |
Determine the maximum number of active bits that an array's size can require, which limits the maximum size of the array.
Definition at line 111 of file Type.cpp.
References clang::ASTContext::getSizeType(), and clang::ASTContext::getTypeSize().
Referenced by clang::Sema::BuildArrayType(), clang::Sema::BuildCXXNew(), and TryToFixInvalidVariablyModifiedType().
unsigned ConstantArrayType::getNumAddressingBits | ( | ASTContext & | Context, |
QualType | ElementType, | ||
const llvm::APInt & | NumElements | ||
) | [static] |
Determine the number of bits required to address a member of.
Definition at line 76 of file Type.cpp.
References clang::CharUnits::getQuantity(), clang::ASTContext::getSizeType(), clang::ASTContext::getTypeSize(), and clang::ASTContext::getTypeSizeInChars().
Referenced by clang::Sema::BuildArrayType(), clang::Sema::BuildCXXNew(), and TryToFixInvalidVariablyModifiedType().
const llvm::APInt& clang::ConstantArrayType::getSize | ( | ) | const [inline] |
Definition at line 2306 of file Type.h.
Referenced by buildSingleCopyAssignRecursively(), clang::Sema::CheckFormatString(), clang::Sema::CheckStaticArrayArgument(), CheckStringInit(), clang::CodeGen::CodeGenTypes::ConvertType(), DeduceTemplateArgumentsByTypeMatch(), EmitAggMemberInitializer(), clang::CodeGen::CodeGenModule::EmitNullConstant(), findSubobject(), clang::Sema::FormatStringHasSArg(), clang::ASTContext::getAsArrayType(), clang::ASTContext::getConstantArrayElementCount(), getConstantArrayInfoInChars(), clang::ASTContext::getUnqualifiedArrayType(), clang::ASTContext::getVariableArrayDecayedType(), IsStructurallyEquivalent(), clang::ASTContext::mergeTypes(), and clang::ASTNodeImporter::VisitConstantArrayType().
bool clang::ConstantArrayType::isSugared | ( | ) | const [inline] |
void clang::ConstantArrayType::Profile | ( | llvm::FoldingSetNodeID & | ID | ) | [inline] |
Definition at line 2321 of file Type.h.
References getElementType().
Referenced by clang::ASTContext::getConstantArrayType().
static void clang::ConstantArrayType::Profile | ( | llvm::FoldingSetNodeID & | ID, |
QualType | ET, | ||
const llvm::APInt & | ArraySize, | ||
ArraySizeModifier | SizeMod, | ||
unsigned | TypeQuals | ||
) | [inline, static] |
Definition at line 2325 of file Type.h.
References clang::QualType::getAsOpaquePtr().
friend class ASTContext [friend] |
Reimplemented from clang::ArrayType.