clang API Documentation
#include <TypeLocBuilder.h>
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) |
| 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) |
| 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 23 of file TypeLocBuilder.h.
| clang::TypeLocBuilder::TypeLocBuilder | ( | ) | [inline] |
Definition at line 47 of file TypeLocBuilder.h.
| clang::TypeLocBuilder::~TypeLocBuilder | ( | ) | [inline] |
Definition at line 53 of file TypeLocBuilder.h.
| void clang::TypeLocBuilder::clear | ( | ) | [inline] |
Resets this builder to the newly-initialized state.
Definition at line 78 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 117 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] |
Creates a TypeSourceInfo for the given type.
Definition at line 104 of file TypeLocBuilder.h.
References clang::ASTContext::CreateTypeSourceInfo(), clang::TypeLoc::getOpaqueData(), and clang::TypeSourceInfo::getTypeLoc().
Referenced by clang::Sema::ActOnDelayedDefaultTemplateArg(), clang::Sema::ActOnDependentTag(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnTypenameType(), buildNestedType(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::CheckPackExpansion(), clang::Sema::CheckTemplateTypeArgument(), GetFullTypeForDeclarator(), clang::Sema::getTemplateArgumentPackExpansionPattern(), clang::Sema::getTypeName(), clang::Sema::performLambdaInitCaptureInitialization(), recoverFromTypeInKnownDependentBase(), clang::Sema::SubstFunctionDeclType(), clang::Sema::SubstType(), and clang::TreeTransform< Derived >::TransformType().
| TyLocType clang::TypeLocBuilder::push | ( | QualType | T | ) | [inline] |
Pushes space for a new TypeLoc of the given type. Invalidates any TypeLocs previously retrieved from this builder.
Definition at line 96 of file TypeLocBuilder.h.
References clang::TypeLoc::castAs().
Referenced by clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnCXXNestedNameSpecifierDecltype(), clang::Sema::ActOnDelayedDefaultTemplateArg(), clang::Sema::ActOnDependentTag(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnTypenameType(), clang::Sema::BuildCXXNestedNameSpecifier(), buildNestedType(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::CheckPackExpansion(), clang::Sema::CheckTemplateTypeArgument(), GetFullTypeForDeclarator(), clang::Sema::getTypeName(), clang::Sema::performLambdaInitCaptureInitialization(), recoverFromTypeInKnownDependentBase(), 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 19 of file TypeLocBuilder.cpp.
References clang::TypeLoc::getFullDataSize(), clang::TypeLoc::getNextTypeLoc(), clang::TypeLoc::getTypeLocClass(), and reserve().
Referenced by clang::Sema::CheckPackExpansion(), GetFullTypeForDeclarator(), clang::Sema::getTemplateArgumentPackExpansionPattern(), and clang::Sema::SubstType().
| TypeSpecTypeLoc clang::TypeLocBuilder::pushTypeSpec | ( | QualType | T | ) | [inline] |
Pushes space for a typespec TypeLoc. Invalidates any TypeLocs previously retrieved from this builder.
Definition at line 71 of file TypeLocBuilder.h.
References clang::TypeLoc::castAs(), clang::TypeSpecTypeLoc::LocalDataAlignment, and clang::TypeSpecTypeLoc::LocalDataSize.
Referenced by buildNestedType(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::getTypeName(), and clang::Sema::performLambdaInitCaptureInitialization().
| void clang::TypeLocBuilder::reserve | ( | size_t | Requested | ) | [inline] |
Ensures that this buffer has at least as much capacity as described.
Definition at line 59 of file TypeLocBuilder.h.
Referenced by pushFullCopy(), 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 88 of file TypeLocBuilder.h.
Referenced by clang::TreeTransform< Derived >::TransformReferenceType().