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) |
| TypeLoc | pushFullUninitialized (QualType T) |
| 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. | |
| TypeLoc | getTemporaryTypeLoc (QualType T) |
Retrieve a temporary TypeLoc that refers into this TypeLocBuilder object. | |
Definition at line 23 of file TypeLocBuilder.h.
| clang::TypeLocBuilder::TypeLocBuilder | ( | ) | [inline] |
Definition at line 45 of file TypeLocBuilder.h.
| clang::TypeLocBuilder::~TypeLocBuilder | ( | ) | [inline] |
Definition at line 48 of file TypeLocBuilder.h.
| void clang::TypeLocBuilder::clear | ( | ) | [inline] |
Resets this builder to the newly-initialized state.
Definition at line 82 of file TypeLocBuilder.h.
Retrieve a temporary TypeLoc that refers into this TypeLocBuilder object.
The resulting TypeLoc should only be used so long as the TypeLocBuilder is active and has not had more type information pushed into it.
Definition at line 191 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 118 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 105 of file TypeLocBuilder.h.
References clang::ASTContext::CreateTypeSourceInfo(), clang::TypeLoc::getOpaqueData(), and clang::TypeSourceInfo::getTypeLoc().
Referenced by clang::Sema::ActOnDependentTag(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnTypenameType(), clang::Sema::getTypeName(), 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 99 of file TypeLocBuilder.h.
Referenced by clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnCXXNestedNameSpecifierDecltype(), clang::Sema::ActOnDependentTag(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnTypenameType(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::getTypeName(), clang::TreeTransform< Derived >::TransformDependentTemplateSpecializationType(), clang::TreeTransform< Derived >::TransformReferenceType(), and clang::TransformTypeSpecType().
| void clang::TypeLocBuilder::pushFullCopy | ( | TypeLoc | L | ) | [inline] |
Pushes a copy of the given TypeLoc onto this builder. The builder must be empty for this to work.
Definition at line 62 of file TypeLocBuilder.h.
References clang::TypeLoc::getFullDataSize(), clang::TypeLoc::getOpaqueData(), and clang::TypeLoc::getType().
Referenced by clang::Sema::SubstType().
Pushes uninitialized space for the given type. The builder must be empty.
Definition at line 70 of file TypeLocBuilder.h.
References clang::TypeLoc::getFullDataSizeForType().
| TypeSpecTypeLoc clang::TypeLocBuilder::pushTypeSpec | ( | QualType | T | ) | [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::TypeSpecTypeLoc::LocalDataSize.
Referenced by clang::Sema::getTypeName().
| void clang::TypeLocBuilder::reserve | ( | size_t | Requested | ) | [inline] |
Ensures that this buffer has at least as much capacity as described.
Definition at line 54 of file TypeLocBuilder.h.
Referenced by 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 91 of file TypeLocBuilder.h.
Referenced by clang::TreeTransform< Derived >::TransformReferenceType().