clang API Documentation

Public Member Functions
clang::TypeLocBuilder Class Reference

#include <TypeLocBuilder.h>

List of all members.

Public Member Functions

 TypeLocBuilder ()
 ~TypeLocBuilder ()
void reserve (size_t Requested)
 Ensures that this buffer has at least as much capacity as described.
void pushFullCopy (TypeLoc L)
TypeLoc pushFullUninitialized (QualType T)
TypeSpecTypeLoc pushTypeSpec (QualType T)
void clear ()
 Resets this builder to the newly-initialized state.
void TypeWasModifiedSafely (QualType T)
 Tell the TypeLocBuilder that the type it is storing has been modified in some safe way that doesn't affect type-location information.
template<class TyLocType >
TyLocType push (QualType T)
TypeSourceInfogetTypeSourceInfo (ASTContext &Context, QualType T)
 Creates a TypeSourceInfo for the given type.
TypeLoc getTypeLocInContext (ASTContext &Context, QualType T)
 Copies the type-location information to the given AST context and returns a TypeLoc referring into the AST context.
TypeLoc getTemporaryTypeLoc (QualType T)
 Retrieve a temporary TypeLoc that refers into this TypeLocBuilder object.

Detailed Description

Definition at line 23 of file TypeLocBuilder.h.


Constructor & Destructor Documentation

clang::TypeLocBuilder::TypeLocBuilder ( ) [inline]

Definition at line 45 of file TypeLocBuilder.h.

clang::TypeLocBuilder::~TypeLocBuilder ( ) [inline]

Definition at line 48 of file TypeLocBuilder.h.


Member Function Documentation

void clang::TypeLocBuilder::clear ( ) [inline]

Resets this builder to the newly-initialized state.

Definition at line 82 of file TypeLocBuilder.h.

TypeLoc clang::TypeLocBuilder::getTemporaryTypeLoc ( QualType  T) [inline]

Retrieve a temporary TypeLoc that refers into this TypeLocBuilder object.

The resulting TypeLoc should only be used so long as the TypeLocBuilder is active and has not had more type information pushed into it.

Definition at line 191 of file TypeLocBuilder.h.

TypeLoc clang::TypeLocBuilder::getTypeLocInContext ( ASTContext Context,
QualType  T 
) [inline]

Copies the type-location information to the given AST context and returns a TypeLoc referring into the AST context.

Definition at line 118 of file TypeLocBuilder.h.

References clang::ASTContext::Allocate().

Referenced by clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnCXXNestedNameSpecifierDecltype(), and clang::Sema::BuildCXXNestedNameSpecifier().

TypeSourceInfo* clang::TypeLocBuilder::getTypeSourceInfo ( ASTContext Context,
QualType  T 
) [inline]
template<class TyLocType >
TyLocType clang::TypeLocBuilder::push ( QualType  T) [inline]
void clang::TypeLocBuilder::pushFullCopy ( TypeLoc  L) [inline]

Pushes a copy of the given TypeLoc onto this builder. The builder must be empty for this to work.

Definition at line 62 of file TypeLocBuilder.h.

References clang::TypeLoc::getFullDataSize(), clang::TypeLoc::getOpaqueData(), and clang::TypeLoc::getType().

Referenced by clang::Sema::SubstType().

TypeLoc clang::TypeLocBuilder::pushFullUninitialized ( QualType  T) [inline]

Pushes uninitialized space for the given type. The builder must be empty.

Definition at line 70 of file TypeLocBuilder.h.

References clang::TypeLoc::getFullDataSizeForType().

TypeSpecTypeLoc clang::TypeLocBuilder::pushTypeSpec ( QualType  T) [inline]

Pushes space for a typespec TypeLoc. Invalidates any TypeLocs previously retrieved from this builder.

Definition at line 76 of file TypeLocBuilder.h.

References clang::TypeSpecTypeLoc::LocalDataSize.

Referenced by clang::Sema::getTypeName().

void clang::TypeLocBuilder::reserve ( size_t  Requested) [inline]

Ensures that this buffer has at least as much capacity as described.

Definition at line 54 of file TypeLocBuilder.h.

Referenced by clang::Sema::SubstFunctionDeclType(), clang::Sema::SubstType(), and clang::TreeTransform< Derived >::TransformType().

void clang::TypeLocBuilder::TypeWasModifiedSafely ( QualType  T) [inline]

Tell the TypeLocBuilder that the type it is storing has been modified in some safe way that doesn't affect type-location information.

Definition at line 91 of file TypeLocBuilder.h.

Referenced by clang::TreeTransform< Derived >::TransformReferenceType().


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