clang 20.0.0git
|
#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 | |
TypeLocBuilder & | operator= (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. | |
TypeSourceInfo * | getTypeSourceInfo (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. | |
Definition at line 22 of file TypeLocBuilder.h.
|
inline |
Definition at line 47 of file TypeLocBuilder.h.
|
inline |
Definition at line 51 of file TypeLocBuilder.h.
|
delete |
|
inline |
Resets this builder to the newly-initialized state.
Definition at line 83 of file TypeLocBuilder.h.
|
inline |
Copies the type-location information to the given AST context and returns a TypeLoc
referring into the AST context.
Definition at line 123 of file TypeLocBuilder.h.
References memcpy(), and clang::T.
Referenced by clang::Sema::ActOnCXXNestedNameSpecifierDecltype(), clang::Sema::ActOnCXXNestedNameSpecifierIndexedPack(), and clang::Sema::BuildCXXNestedNameSpecifier().
|
inline |
Creates a TypeSourceInfo for the given type.
Definition at line 110 of file TypeLocBuilder.h.
References clang::TypeLoc::getOpaqueData(), clang::TypeSourceInfo::getTypeLoc(), memcpy(), and clang::T.
Referenced by clang::Sema::ActOnDependentTag(), clang::SemaObjC::actOnObjCTypeParam(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateIdType(), clang::Sema::buildLambdaInitCaptureInitialization(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::CheckPackExpansion(), clang::Sema::CheckTemplateTypeArgument(), GetFullTypeForDeclarator(), clang::Sema::getTemplateArgumentPackExpansionPattern(), clang::Sema::getTypeName(), clang::Sema::SubstFunctionDeclType(), clang::Sema::SubstType(), clang::TreeTransform< Derived >::TransformType(), and clang::TreeTransform< Derived >::TransformTypeWithDeducedTST().
|
delete |
|
inline |
Pushes space for a new TypeLoc of the given type.
Invalidates any TypeLocs previously retrieved from this builder.
Definition at line 102 of file TypeLocBuilder.h.
References clang::TypeLoc::castAs(), Loc, and clang::T.
Referenced by clang::Sema::ActOnCXXNestedNameSpecifierDecltype(), clang::Sema::ActOnCXXNestedNameSpecifierIndexedPack(), clang::Sema::ActOnDependentTag(), clang::SemaObjC::actOnObjCTypeParam(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateIdType(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::buildLambdaInitCaptureInitialization(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::CheckPackExpansion(), clang::Sema::CheckTemplateTypeArgument(), GetFullTypeForDeclarator(), clang::Sema::getTypeName(), clang::Sema::InstantiateFunctionDefinition(), clang::TreeTransform< Derived >::TransformAttributedType(), clang::TreeTransform< Derived >::TransformDependentTemplateSpecializationType(), clang::TreeTransform< Derived >::TransformFunctionProtoType(), clang::TreeTransform< Derived >::TransformReferenceType(), and clang::TransformTypeSpecType().
void TypeLocBuilder::pushFullCopy | ( | TypeLoc | L | ) |
Pushes a copy of the given TypeLoc onto this builder.
The builder must be empty for this to work.
Definition at line 18 of file TypeLocBuilder.cpp.
References clang::TypeLoc::getFullDataSize(), clang::TypeLoc::getNextTypeLoc(), clang::TypeLoc::getTypeLocClass(), and reserve().
Referenced by clang::SemaObjC::actOnObjCTypeParam(), clang::Sema::CheckPackExpansion(), GetFullTypeForDeclarator(), clang::Sema::getTemplateArgumentPackExpansionPattern(), and clang::Sema::SubstType().
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::BuildCXXNestedNameSpecifier().
|
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::TypeLoc::castAs(), clang::TypeSpecTypeLoc::LocalDataAlignment, clang::TypeSpecTypeLoc::LocalDataSize, and clang::T.
Referenced by clang::Sema::BuildCXXNestedNameSpecifier(), and clang::Sema::BuildQualifiedDeclarationNameExpr().
|
inline |
Ensures that this buffer has at least as much capacity as described.
Definition at line 60 of file TypeLocBuilder.h.
Referenced by pushFullCopy(), pushTrivial(), clang::Sema::SubstFunctionDeclType(), clang::Sema::SubstType(), clang::TreeTransform< Derived >::TransformAttributedType(), clang::TreeTransform< Derived >::TransformType(), and clang::TreeTransform< Derived >::TransformTypeWithDeducedTST().
|
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().