class NestedNameSpecifierLocBuilder
Declaration
class NestedNameSpecifierLocBuilder { /* full declaration omitted */ };
Description
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.
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:356
Member Variables
- private clang::NestedNameSpecifier* Representation = nullptr
- The current representation of the nested-name-specifier we're building.
- private char* Buffer = nullptr
- Note that we explicitly manage the buffer (rather than using a SmallVector) because \c Declarator expects it to be possible to memcpy() a \c CXXScopeSpec, and CXXScopeSpec uses a NestedNameSpecifierLocBuilder.
- private unsigned int BufferSize = 0
- The size of the buffer used to store source-location information for the nested-name-specifier.
- private unsigned int BufferCapacity = 0
- The capacity of the buffer used to store source-location information for the nested-name-specifier.
Method Overview
- public void Adopt(clang::NestedNameSpecifierLoc Other)
- public void Clear()
- public void Extend(clang::ASTContext & Context, clang::SourceLocation TemplateKWLoc, clang::TypeLoc TL, clang::SourceLocation ColonColonLoc)
- public void Extend(clang::ASTContext & Context, clang::IdentifierInfo * Identifier, clang::SourceLocation IdentifierLoc, clang::SourceLocation ColonColonLoc)
- public void Extend(clang::ASTContext & Context, clang::NamespaceDecl * Namespace, clang::SourceLocation NamespaceLoc, clang::SourceLocation ColonColonLoc)
- public void Extend(clang::ASTContext & Context, clang::NamespaceAliasDecl * Alias, clang::SourceLocation AliasLoc, clang::SourceLocation ColonColonLoc)
- public void MakeGlobal(clang::ASTContext & Context, clang::SourceLocation ColonColonLoc)
- public void MakeSuper(clang::ASTContext & Context, clang::CXXRecordDecl * RD, clang::SourceLocation SuperLoc, clang::SourceLocation ColonColonLoc)
- public void MakeTrivial(clang::ASTContext & Context, clang::NestedNameSpecifier * Qualifier, clang::SourceRange R)
- public NestedNameSpecifierLocBuilder(const clang::NestedNameSpecifierLocBuilder & Other)
- public NestedNameSpecifierLocBuilder()
- public std::pair<char *, unsigned int> getBuffer() const
- public clang::NestedNameSpecifier * getRepresentation() const
- public clang::SourceRange getSourceRange() const
- public clang::NestedNameSpecifierLoc getTemporary() const
- public clang::NestedNameSpecifierLoc getWithLocInContext(clang::ASTContext & Context) const
- public ~NestedNameSpecifierLocBuilder()
Methods
¶void Adopt(clang::NestedNameSpecifierLoc Other)
void Adopt(clang::NestedNameSpecifierLoc Other)
Description
Adopt an existing nested-name-specifier (with source-range information).
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:480
Parameters
¶void Clear()
void Clear()
Description
Clear out this builder, and prepare it to build another nested-name-specifier with source-location information.
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:505
¶void Extend(clang::ASTContext& Context,
clang::SourceLocation TemplateKWLoc,
clang::TypeLoc TL,
clang::SourceLocation ColonColonLoc)
void Extend(clang::ASTContext& Context,
clang::SourceLocation TemplateKWLoc,
clang::TypeLoc TL,
clang::SourceLocation ColonColonLoc)
Description
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'type::'.
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:403
Parameters
- clang::ASTContext& Context
- The AST context in which this nested-name-specifier resides.
- clang::SourceLocation TemplateKWLoc
- The location of the 'template' keyword, if present.
- clang::TypeLoc TL
- The TypeLoc that describes the type preceding the '::'.
- clang::SourceLocation ColonColonLoc
- The location of the trailing '::'.
¶void Extend(clang::ASTContext& Context,
clang::IdentifierInfo* Identifier,
clang::SourceLocation IdentifierLoc,
clang::SourceLocation ColonColonLoc)
void Extend(clang::ASTContext& Context,
clang::IdentifierInfo* Identifier,
clang::SourceLocation IdentifierLoc,
clang::SourceLocation ColonColonLoc)
Description
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'identifier::'.
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:417
Parameters
- clang::ASTContext& Context
- The AST context in which this nested-name-specifier resides.
- clang::IdentifierInfo* Identifier
- The identifier.
- clang::SourceLocation IdentifierLoc
- The location of the identifier.
- clang::SourceLocation ColonColonLoc
- The location of the trailing '::'.
¶void Extend(clang::ASTContext& Context,
clang::NamespaceDecl* Namespace,
clang::SourceLocation NamespaceLoc,
clang::SourceLocation ColonColonLoc)
void Extend(clang::ASTContext& Context,
clang::NamespaceDecl* Namespace,
clang::SourceLocation NamespaceLoc,
clang::SourceLocation ColonColonLoc)
Description
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'namespace::'.
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:431
Parameters
- clang::ASTContext& Context
- The AST context in which this nested-name-specifier resides.
- clang::NamespaceDecl* Namespace
- The namespace.
- clang::SourceLocation NamespaceLoc
- The location of the namespace name.
- clang::SourceLocation ColonColonLoc
- The location of the trailing '::'.
¶void Extend(clang::ASTContext& Context,
clang::NamespaceAliasDecl* Alias,
clang::SourceLocation AliasLoc,
clang::SourceLocation ColonColonLoc)
void Extend(clang::ASTContext& Context,
clang::NamespaceAliasDecl* Alias,
clang::SourceLocation AliasLoc,
clang::SourceLocation ColonColonLoc)
Description
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'namespace-alias::'.
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:446
Parameters
- clang::ASTContext& Context
- The AST context in which this nested-name-specifier resides.
- clang::NamespaceAliasDecl* Alias
- The namespace alias.
- clang::SourceLocation AliasLoc
- The location of the namespace alias name.
- clang::SourceLocation ColonColonLoc
- The location of the trailing '::'.
¶void MakeGlobal(
clang::ASTContext& Context,
clang::SourceLocation ColonColonLoc)
void MakeGlobal(
clang::ASTContext& Context,
clang::SourceLocation ColonColonLoc)
Description
Turn this (empty) nested-name-specifier into the global nested-name-specifier '::'.
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:451
Parameters
- clang::ASTContext& Context
- clang::SourceLocation ColonColonLoc
¶void MakeSuper(
clang::ASTContext& Context,
clang::CXXRecordDecl* RD,
clang::SourceLocation SuperLoc,
clang::SourceLocation ColonColonLoc)
void MakeSuper(
clang::ASTContext& Context,
clang::CXXRecordDecl* RD,
clang::SourceLocation SuperLoc,
clang::SourceLocation ColonColonLoc)
Description
Turns this (empty) nested-name-specifier into '__super' nested-name-specifier.
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:466
Parameters
- clang::ASTContext& Context
- The AST context in which this nested-name-specifier resides.
- clang::CXXRecordDecl* RD
- The declaration of the class in which nested-name-specifier appeared.
- clang::SourceLocation SuperLoc
- The location of the '__super' keyword. name.
- clang::SourceLocation ColonColonLoc
- The location of the trailing '::'.
¶void MakeTrivial(
clang::ASTContext& Context,
clang::NestedNameSpecifier* Qualifier,
clang::SourceRange R)
void MakeTrivial(
clang::ASTContext& Context,
clang::NestedNameSpecifier* Qualifier,
clang::SourceRange R)
Description
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\c Adopt() with a proper \c NestedNameSpecifierLoc.
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:475
Parameters
- clang::ASTContext& Context
- clang::NestedNameSpecifier* Qualifier
- clang::SourceRange R
¶NestedNameSpecifierLocBuilder(
const clang::NestedNameSpecifierLocBuilder&
Other)
NestedNameSpecifierLocBuilder(
const clang::NestedNameSpecifierLocBuilder&
Other)
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:379
Parameters
- const clang::NestedNameSpecifierLocBuilder& Other
¶NestedNameSpecifierLocBuilder()
NestedNameSpecifierLocBuilder()
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:378
¶std::pair<char*, unsigned int> getBuffer() const
std::pair<char*, unsigned int> getBuffer() const
Description
Retrieve the underlying buffer.
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:515
Returns
A pair containing a pointer to the buffer of source-location data and the size of the source-location data that resides in that buffer.
¶clang::NestedNameSpecifier* getRepresentation()
const
clang::NestedNameSpecifier* getRepresentation()
const
Description
Retrieve the representation of the nested-name-specifier.
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:390
¶clang::SourceRange getSourceRange() const
clang::SourceRange getSourceRange() const
Description
Retrieve the source range covered by this nested-name-specifier.
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:483
¶clang::NestedNameSpecifierLoc getTemporary() const
clang::NestedNameSpecifierLoc getTemporary() const
Description
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.
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:499
¶clang::NestedNameSpecifierLoc getWithLocInContext(
clang::ASTContext& Context) const
clang::NestedNameSpecifierLoc getWithLocInContext(
clang::ASTContext& Context) const
Description
Retrieve a nested-name-specifier with location information, copied into the given AST context.
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:492
Parameters
- clang::ASTContext& Context
- The context into which this nested-name-specifier will be copied.
¶~NestedNameSpecifierLocBuilder()
~NestedNameSpecifierLocBuilder()
Declared at: clang/include/clang/AST/NestedNameSpecifier.h:384