clang API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
clang::ConstantArrayType Class Reference

#include <Type.h>

Inheritance diagram for clang::ConstantArrayType:
Inheritance graph
[legend]
Collaboration diagram for clang::ConstantArrayType:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

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.

Definition at line 2291 of file Type.h.


Constructor & Destructor Documentation

clang::ConstantArrayType::ConstantArrayType ( TypeClass  tc,
QualType  et,
QualType  can,
const llvm::APInt &  size,
ArraySizeModifier  sm,
unsigned  tq 
) [inline, protected]

Definition at line 2300 of file Type.h.


Member Function Documentation

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().

Definition at line 2308 of file Type.h.

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]
const llvm::APInt& clang::ConstantArrayType::getSize ( ) const [inline]

Definition at line 2307 of file Type.h.

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().


Friends And Related Function Documentation

friend class ASTContext [friend]

Reimplemented from clang::ArrayType.

Definition at line 2304 of file Type.h.


The documentation for this class was generated from the following files: