class TypeLocBuilder
Declaration
class TypeLocBuilder { /* full declaration omitted */ };
Declared at: clang/lib/Sema/TypeLocBuilder.h:22
Member Variables
- private char* Buffer
- The underlying location-data buffer. Data grows from the end of the buffer backwards.
- private size_t Capacity
- The capacity of the current buffer.
- private size_t Index
- The index of the first occupied byte in the buffer.
- private clang::QualType LastTy
- The last type pushed on this builder.
- private char[32] InlineBuffer
- private unsigned int NumBytesAtAlign4
- private unsigned int NumBytesAtAlign8
Method Overview
- public TypeLocBuilder()
- public void TypeWasModifiedSafely(clang::QualType T)
- public void clear()
- private clang::TypeLoc getTemporaryTypeLoc(clang::QualType T)
- public clang::TypeLoc getTypeLocInContext(clang::ASTContext & Context, clang::QualType T)
- public clang::TypeSourceInfo * getTypeSourceInfo(clang::ASTContext & Context, clang::QualType T)
- private void grow(size_t NewCapacity)
- public template <class TyLocType>TyLocType push(clang::QualType T)
- public void pushFullCopy(clang::TypeLoc L)
- private clang::TypeLoc pushImpl(clang::QualType T, size_t LocalSize, unsigned int LocalAlignment)
- public clang::TypeSpecTypeLoc pushTypeSpec(clang::QualType T)
- public void reserve(size_t Requested)
- public ~TypeLocBuilder()
Methods
¶TypeLocBuilder()
TypeLocBuilder()
Declared at: clang/lib/Sema/TypeLocBuilder.h:46
¶void TypeWasModifiedSafely(clang::QualType T)
void TypeWasModifiedSafely(clang::QualType T)
Description
Tell the TypeLocBuilder that the type it is storing has been modified in some safe way that doesn't affect type-location information.
Declared at: clang/lib/Sema/TypeLocBuilder.h:85
Parameters
¶void clear()
void clear()
Description
Resets this builder to the newly-initialized state.
Declared at: clang/lib/Sema/TypeLocBuilder.h:75
¶clang::TypeLoc getTemporaryTypeLoc(
clang::QualType T)
clang::TypeLoc getTemporaryTypeLoc(
clang::QualType T)
Description
Retrieve a temporary TypeLoc that refers into this \c TypeLocBuilder object. The resulting \c TypeLoc should only be used so long as the\c TypeLocBuilder is active and has not had more type information pushed into it.
Declared at: clang/lib/Sema/TypeLocBuilder.h:138
Parameters
¶clang::TypeLoc getTypeLocInContext(
clang::ASTContext& Context,
clang::QualType T)
clang::TypeLoc getTypeLocInContext(
clang::ASTContext& Context,
clang::QualType T)
Description
Copies the type-location information to the given AST context and returns a \c TypeLoc referring into the AST context.
Declared at: clang/lib/Sema/TypeLocBuilder.h:114
Parameters
- clang::ASTContext& Context
- clang::QualType T
¶clang::TypeSourceInfo* getTypeSourceInfo(
clang::ASTContext& Context,
clang::QualType T)
clang::TypeSourceInfo* getTypeSourceInfo(
clang::ASTContext& Context,
clang::QualType T)
Description
Creates a TypeSourceInfo for the given type.
Declared at: clang/lib/Sema/TypeLocBuilder.h:101
Parameters
- clang::ASTContext& Context
- clang::QualType T
¶void grow(size_t NewCapacity)
void grow(size_t NewCapacity)
Description
Grow to the given capacity.
Declared at: clang/lib/Sema/TypeLocBuilder.h:130
Parameters
- size_t NewCapacity
¶template <class TyLocType>
TyLocType push(clang::QualType T)
template <class TyLocType>
TyLocType push(clang::QualType T)
Description
Pushes space for a new TypeLoc of the given type. Invalidates any TypeLocs previously retrieved from this builder.
Declared at: clang/lib/Sema/TypeLocBuilder.h:93
Templates
- TyLocType
Parameters
¶void pushFullCopy(clang::TypeLoc L)
void pushFullCopy(clang::TypeLoc L)
Description
Pushes a copy of the given TypeLoc onto this builder. The builder must be empty for this to work.
Declared at: clang/lib/Sema/TypeLocBuilder.h:64
Parameters
¶clang::TypeLoc pushImpl(
clang::QualType T,
size_t LocalSize,
unsigned int LocalAlignment)
clang::TypeLoc pushImpl(
clang::QualType T,
size_t LocalSize,
unsigned int LocalAlignment)
Declared at: clang/lib/Sema/TypeLocBuilder.h:127
Parameters
- clang::QualType T
- size_t LocalSize
- unsigned int LocalAlignment
¶clang::TypeSpecTypeLoc pushTypeSpec(
clang::QualType T)
clang::TypeSpecTypeLoc pushTypeSpec(
clang::QualType T)
Description
Pushes space for a typespec TypeLoc. Invalidates any TypeLocs previously retrieved from this builder.
Declared at: clang/lib/Sema/TypeLocBuilder.h:68
Parameters
¶void reserve(size_t Requested)
void reserve(size_t Requested)
Description
Ensures that this buffer has at least as much capacity as described.
Declared at: clang/lib/Sema/TypeLocBuilder.h:56
Parameters
- size_t Requested
¶~TypeLocBuilder()
~TypeLocBuilder()
Declared at: clang/lib/Sema/TypeLocBuilder.h:50