clang 22.0.0git
clang::TypeLocBuilder Class Reference

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Sema/TypeLocBuilder.h"

Public Member Functions

 TypeLocBuilder ()
 ~TypeLocBuilder ()
 TypeLocBuilder (const TypeLocBuilder &)=delete
TypeLocBuilderoperator= (const TypeLocBuilder &)=delete
void reserve (size_t Requested)
 Ensures that this buffer has at least as much capacity as described.
void pushFullCopy (TypeLoc L)
 Pushes a copy of the given TypeLoc onto this builder.
void pushTrivial (ASTContext &Context, QualType T, SourceLocation Loc)
 Pushes 'T' with all locations pointing to 'Loc'.
TypeSpecTypeLoc pushTypeSpec (QualType T)
 Pushes space for a typespec TypeLoc.
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)
 Pushes space for a new TypeLoc of the given type.
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.

Detailed Description

Definition at line 22 of file TypeLocBuilder.h.

Constructor & Destructor Documentation

◆ TypeLocBuilder() [1/2]

clang::TypeLocBuilder::TypeLocBuilder ( )
inline

Definition at line 47 of file TypeLocBuilder.h.

References false.

Referenced by operator=(), and TypeLocBuilder().

◆ ~TypeLocBuilder()

clang::TypeLocBuilder::~TypeLocBuilder ( )
inline

Definition at line 51 of file TypeLocBuilder.h.

◆ TypeLocBuilder() [2/2]

clang::TypeLocBuilder::TypeLocBuilder ( const TypeLocBuilder & )
delete

References TypeLocBuilder().

Member Function Documentation

◆ clear()

void clang::TypeLocBuilder::clear ( )
inline

Resets this builder to the newly-initialized state.

Definition at line 83 of file TypeLocBuilder.h.

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

◆ getTypeLocInContext()

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

◆ getTypeSourceInfo()

◆ operator=()

TypeLocBuilder & clang::TypeLocBuilder::operator= ( const TypeLocBuilder & )
delete

References TypeLocBuilder().

◆ push()

◆ pushFullCopy()

◆ pushTrivial()

void TypeLocBuilder::pushTrivial ( ASTContext & Context,
QualType T,
SourceLocation Loc )

Pushes 'T' with all locations pointing to 'Loc'.

The builder must be empty for this to work.

Definition at line 44 of file TypeLocBuilder.cpp.

References reserve(), and clang::T.

Referenced by clang::Sema::ActOnCXXNestedNameSpecifierIndexedPack(), clang::Sema::ActOnPseudoDestructorExpr(), and clang::Sema::InstantiateFunctionDefinition().

◆ pushTypeSpec()

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

◆ reserve()

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

◆ TypeWasModifiedSafely()

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 94 of file TypeLocBuilder.h.

References clang::T.

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


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