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

Methods

TypeLocBuilder()

Declared at: clang/lib/Sema/TypeLocBuilder.h:46

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

clang::QualType T

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)

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::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)

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)

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)

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

clang::QualType T

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 L

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)

Description

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

Declared at: clang/lib/Sema/TypeLocBuilder.h:68

Parameters

clang::QualType T

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

Declared at: clang/lib/Sema/TypeLocBuilder.h:50