clang API Documentation
Class that aids in the construction of nested-name-specifiers along with source-location information for all of the components of the nested-name-specifier. More...
#include <NestedNameSpecifier.h>
Public Member Functions | |
| NestedNameSpecifierLocBuilder () | |
| NestedNameSpecifierLocBuilder (const NestedNameSpecifierLocBuilder &Other) | |
| NestedNameSpecifierLocBuilder & | operator= (const NestedNameSpecifierLocBuilder &Other) |
| ~NestedNameSpecifierLocBuilder () | |
| NestedNameSpecifier * | getRepresentation () const |
| Retrieve the representation of the nested-name-specifier. | |
| void | Extend (ASTContext &Context, SourceLocation TemplateKWLoc, TypeLoc TL, SourceLocation ColonColonLoc) |
| Extend the current nested-name-specifier by another nested-name-specifier component of the form 'type::'. | |
| void | Extend (ASTContext &Context, IdentifierInfo *Identifier, SourceLocation IdentifierLoc, SourceLocation ColonColonLoc) |
| Extend the current nested-name-specifier by another nested-name-specifier component of the form 'identifier::'. | |
| void | Extend (ASTContext &Context, NamespaceDecl *Namespace, SourceLocation NamespaceLoc, SourceLocation ColonColonLoc) |
| Extend the current nested-name-specifier by another nested-name-specifier component of the form 'namespace::'. | |
| void | Extend (ASTContext &Context, NamespaceAliasDecl *Alias, SourceLocation AliasLoc, SourceLocation ColonColonLoc) |
| Extend the current nested-name-specifier by another nested-name-specifier component of the form 'namespace-alias::'. | |
| void | MakeGlobal (ASTContext &Context, SourceLocation ColonColonLoc) |
| Turn this (empty) nested-name-specifier into the global nested-name-specifier '::'. | |
| void | MakeTrivial (ASTContext &Context, NestedNameSpecifier *Qualifier, SourceRange R) |
| Make a new nested-name-specifier from incomplete source-location information. | |
| void | Adopt (NestedNameSpecifierLoc Other) |
| Adopt an existing nested-name-specifier (with source-range information). | |
| SourceRange | getSourceRange () const LLVM_READONLY |
| Retrieve the source range covered by this nested-name-specifier. | |
| NestedNameSpecifierLoc | getWithLocInContext (ASTContext &Context) const |
| Retrieve a nested-name-specifier with location information, copied into the given AST context. | |
| NestedNameSpecifierLoc | getTemporary () const |
| Retrieve a nested-name-specifier with location information based on the information in this builder. This loc will contain references to the builder's internal data and may be invalidated by any change to the builder. | |
| void | Clear () |
| Clear out this builder, and prepare it to build another nested-name-specifier with source-location information. | |
| std::pair< char *, unsigned > | getBuffer () const |
| Retrieve the underlying buffer. | |
Class that aids in the construction of nested-name-specifiers along with source-location information for all of the components of the nested-name-specifier.
Definition at line 321 of file NestedNameSpecifier.h.
| clang::NestedNameSpecifierLocBuilder::NestedNameSpecifierLocBuilder | ( | ) | [inline] |
Definition at line 343 of file NestedNameSpecifier.h.
| NestedNameSpecifierLocBuilder::NestedNameSpecifierLocBuilder | ( | const NestedNameSpecifierLocBuilder & | Other | ) |
Definition at line 438 of file NestedNameSpecifier.cpp.
| clang::NestedNameSpecifierLocBuilder::~NestedNameSpecifierLocBuilder | ( | ) | [inline] |
Definition at line 351 of file NestedNameSpecifier.h.
| void NestedNameSpecifierLocBuilder::Adopt | ( | NestedNameSpecifierLoc | Other | ) |
Adopt an existing nested-name-specifier (with source-range information).
Definition at line 597 of file NestedNameSpecifier.cpp.
References clang::NestedNameSpecifierLoc::getNestedNameSpecifier(), and clang::NestedNameSpecifierLoc::getOpaqueData().
Referenced by clang::CXXScopeSpec::Adopt().
| void clang::NestedNameSpecifierLocBuilder::Clear | ( | ) | [inline] |
Clear out this builder, and prepare it to build another nested-name-specifier with source-location information.
Definition at line 455 of file NestedNameSpecifier.h.
Referenced by clang::CXXScopeSpec::Adopt(), clang::CXXScopeSpec::clear(), and clang::CXXScopeSpec::SetInvalid().
| void NestedNameSpecifierLocBuilder::Extend | ( | ASTContext & | Context, |
| SourceLocation | TemplateKWLoc, | ||
| TypeLoc | TL, | ||
| SourceLocation | ColonColonLoc | ||
| ) |
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'type::'.
| Context | The AST context in which this nested-name-specifier resides. |
| TemplateKWLoc | The location of the 'template' keyword, if present. |
| TL | The TypeLoc that describes the type preceding the '::'. |
| ColonColonLoc | The location of the trailing '::'. |
Definition at line 499 of file NestedNameSpecifier.cpp.
References clang::NestedNameSpecifier::Create(), clang::TypeLoc::getOpaqueData(), clang::TypeLoc::getTypePtr(), and clang::SourceLocation::isValid().
Referenced by clang::CXXScopeSpec::Extend(), and clang::ASTReader::ReadNestedNameSpecifierLoc().
| void NestedNameSpecifierLocBuilder::Extend | ( | ASTContext & | Context, |
| IdentifierInfo * | Identifier, | ||
| SourceLocation | IdentifierLoc, | ||
| SourceLocation | ColonColonLoc | ||
| ) |
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'identifier::'.
| Context | The AST context in which this nested-name-specifier resides. |
| Identifier | The identifier. |
| IdentifierLoc | The location of the identifier. |
| ColonColonLoc | The location of the trailing '::'. |
Definition at line 512 of file NestedNameSpecifier.cpp.
References clang::NestedNameSpecifier::Create().
| void NestedNameSpecifierLocBuilder::Extend | ( | ASTContext & | Context, |
| NamespaceDecl * | Namespace, | ||
| SourceLocation | NamespaceLoc, | ||
| SourceLocation | ColonColonLoc | ||
| ) |
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'namespace::'.
| Context | The AST context in which this nested-name-specifier resides. |
| Namespace | The namespace. |
| NamespaceLoc | The location of the namespace name. |
| ColonColonLoc | The location of the trailing '::'. |
Definition at line 524 of file NestedNameSpecifier.cpp.
References clang::NestedNameSpecifier::Create().
| void NestedNameSpecifierLocBuilder::Extend | ( | ASTContext & | Context, |
| NamespaceAliasDecl * | Alias, | ||
| SourceLocation | AliasLoc, | ||
| SourceLocation | ColonColonLoc | ||
| ) |
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'namespace-alias::'.
| Context | The AST context in which this nested-name-specifier resides. |
| Alias | The namespace alias. |
| AliasLoc | The location of the namespace alias name. |
| ColonColonLoc | The location of the trailing '::'. |
Definition at line 536 of file NestedNameSpecifier.cpp.
References clang::NestedNameSpecifier::Create().
| std::pair<char *, unsigned> clang::NestedNameSpecifierLocBuilder::getBuffer | ( | ) | const [inline] |
Retrieve the underlying buffer.
Definition at line 465 of file NestedNameSpecifier.h.
Referenced by clang::CXXScopeSpec::location_data(), and clang::CXXScopeSpec::location_size().
| NestedNameSpecifier* clang::NestedNameSpecifierLocBuilder::getRepresentation | ( | ) | const [inline] |
Retrieve the representation of the nested-name-specifier.
Definition at line 357 of file NestedNameSpecifier.h.
Referenced by clang::CXXScopeSpec::getLastQualifierNameLoc(), clang::CXXScopeSpec::getScopeRep(), and clang::CXXScopeSpec::getWithLocInContext().
| SourceRange clang::NestedNameSpecifierLocBuilder::getSourceRange | ( | ) | const [inline] |
Retrieve the source range covered by this nested-name-specifier.
Definition at line 434 of file NestedNameSpecifier.h.
References clang::NestedNameSpecifierLoc::getSourceRange().
Referenced by clang::CXXScopeSpec::Extend(), and clang::CXXScopeSpec::MakeGlobal().
| NestedNameSpecifierLoc clang::NestedNameSpecifierLocBuilder::getTemporary | ( | ) | const [inline] |
Retrieve a nested-name-specifier with location information based on the information in this builder. This loc will contain references to the builder's internal data and may be invalidated by any change to the builder.
Definition at line 449 of file NestedNameSpecifier.h.
Referenced by clang::CXXScopeSpec::getLastQualifierNameLoc().
| NestedNameSpecifierLoc NestedNameSpecifierLocBuilder::getWithLocInContext | ( | ASTContext & | Context | ) | const |
Retrieve a nested-name-specifier with location information, copied into the given AST context.
| Context | The context into which this nested-name-specifier will be copied. |
Definition at line 617 of file NestedNameSpecifier.cpp.
References clang::ASTContext::Allocate().
Referenced by getTrivialTemplateArgumentLoc(), clang::CXXScopeSpec::getWithLocInContext(), clang::TemplateSpecializationTypeLoc::initializeArgLocs(), clang::ElaboratedTypeLoc::initializeLocal(), clang::DependentNameTypeLoc::initializeLocal(), clang::DependentTemplateSpecializationTypeLoc::initializeLocal(), clang::TreeTransform< Derived >::InventTemplateArgumentLoc(), and clang::ASTReader::ReadNestedNameSpecifierLoc().
| void NestedNameSpecifierLocBuilder::MakeGlobal | ( | ASTContext & | Context, |
| SourceLocation | ColonColonLoc | ||
| ) |
Turn this (empty) nested-name-specifier into the global nested-name-specifier '::'.
Definition at line 547 of file NestedNameSpecifier.cpp.
References clang::NestedNameSpecifier::GlobalSpecifier().
Referenced by clang::CXXScopeSpec::MakeGlobal(), and clang::ASTReader::ReadNestedNameSpecifierLoc().
| void NestedNameSpecifierLocBuilder::MakeTrivial | ( | ASTContext & | Context, |
| NestedNameSpecifier * | Qualifier, | ||
| SourceRange | R | ||
| ) |
Make a new nested-name-specifier from incomplete source-location information.
This routine should be used very, very rarely, in cases where we need to synthesize a nested-name-specifier. Most code should instead use Adopt() with a proper NestedNameSpecifierLoc.
Definition at line 556 of file NestedNameSpecifier.cpp.
References clang::NestedNameSpecifier::getAsType(), clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::NestedNameSpecifier::getKind(), clang::TypeLoc::getOpaqueData(), clang::NestedNameSpecifier::getPrefix(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getTypeLoc(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
Referenced by getTrivialTemplateArgumentLoc(), clang::TemplateSpecializationTypeLoc::initializeArgLocs(), clang::ElaboratedTypeLoc::initializeLocal(), clang::DependentNameTypeLoc::initializeLocal(), clang::DependentTemplateSpecializationTypeLoc::initializeLocal(), clang::TreeTransform< Derived >::InventTemplateArgumentLoc(), and clang::CXXScopeSpec::MakeTrivial().
| NestedNameSpecifierLocBuilder & NestedNameSpecifierLocBuilder::operator= | ( | const NestedNameSpecifierLocBuilder & | Other | ) |
Definition at line 461 of file NestedNameSpecifier.cpp.