clang API Documentation

Public Member Functions
clang::NestedNameSpecifierLocBuilder Class Reference

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>

List of all members.

Public Member Functions

 NestedNameSpecifierLocBuilder ()
 NestedNameSpecifierLocBuilder (const NestedNameSpecifierLocBuilder &Other)
NestedNameSpecifierLocBuilderoperator= (const NestedNameSpecifierLocBuilder &Other)
 ~NestedNameSpecifierLocBuilder ()
NestedNameSpecifiergetRepresentation () 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 MakeSuper (ASTContext &Context, CXXRecordDecl *RD, SourceLocation SuperLoc, SourceLocation ColonColonLoc)
 Turns this (empty) nested-name-specifier into '__super' 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.
void Clear ()
 Clear out this builder, and prepare it to build another nested-name-specifier with source-location information.
std::pair< char *, unsignedgetBuffer () const
 Retrieve the underlying buffer.

Detailed 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.

Definition at line 338 of file NestedNameSpecifier.h.


Constructor & Destructor Documentation

Definition at line 360 of file NestedNameSpecifier.h.

Definition at line 476 of file NestedNameSpecifier.cpp.

Definition at line 369 of file NestedNameSpecifier.h.


Member Function Documentation

Adopt an existing nested-name-specifier (with source-range information).

Definition at line 642 of file NestedNameSpecifier.cpp.

References clang::NestedNameSpecifierLoc::getNestedNameSpecifier(), and clang::NestedNameSpecifierLoc::getOpaqueData().

Referenced by clang::CXXScopeSpec::Adopt().

Clear out this builder, and prepare it to build another nested-name-specifier with source-location information.

Definition at line 489 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::'.

Parameters:
ContextThe AST context in which this nested-name-specifier resides.
TemplateKWLocThe location of the 'template' keyword, if present.
TLThe TypeLoc that describes the type preceding the '::'.
ColonColonLocThe location of the trailing '::'.

Definition at line 533 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::'.

Parameters:
ContextThe AST context in which this nested-name-specifier resides.
IdentifierThe identifier.
IdentifierLocThe location of the identifier.
ColonColonLocThe location of the trailing '::'.

Definition at line 546 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::'.

Parameters:
ContextThe AST context in which this nested-name-specifier resides.
NamespaceThe namespace.
NamespaceLocThe location of the namespace name.
ColonColonLocThe location of the trailing '::'.

Definition at line 558 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::'.

Parameters:
ContextThe AST context in which this nested-name-specifier resides.
AliasThe namespace alias.
AliasLocThe location of the namespace alias name.
ColonColonLocThe location of the trailing '::'.

Definition at line 570 of file NestedNameSpecifier.cpp.

References clang::NestedNameSpecifier::Create().

std::pair<char *, unsigned> clang::NestedNameSpecifierLocBuilder::getBuffer ( ) const [inline]

Retrieve the underlying buffer.

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.

Definition at line 499 of file NestedNameSpecifier.h.

Referenced by clang::CXXScopeSpec::location_data(), and clang::CXXScopeSpec::location_size().

Retrieve the representation of the nested-name-specifier.

Definition at line 375 of file NestedNameSpecifier.h.

Referenced by clang::CXXScopeSpec::getLastQualifierNameLoc(), clang::CXXScopeSpec::getScopeRep(), and clang::CXXScopeSpec::getWithLocInContext().

Retrieve the source range covered by this nested-name-specifier.

Definition at line 467 of file NestedNameSpecifier.h.

References clang::NestedNameSpecifierLoc::getSourceRange().

Referenced by clang::CXXScopeSpec::Extend(), clang::CXXScopeSpec::MakeGlobal(), and clang::CXXScopeSpec::MakeSuper().

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 483 of file NestedNameSpecifier.h.

Referenced by clang::CXXScopeSpec::getLastQualifierNameLoc().

void NestedNameSpecifierLocBuilder::MakeGlobal ( ASTContext Context,
SourceLocation  ColonColonLoc 
)

Turn this (empty) nested-name-specifier into the global nested-name-specifier '::'.

Definition at line 581 of file NestedNameSpecifier.cpp.

References clang::NestedNameSpecifier::GlobalSpecifier().

Referenced by clang::CXXScopeSpec::MakeGlobal(), and clang::ASTReader::ReadNestedNameSpecifierLoc().

void NestedNameSpecifierLocBuilder::MakeSuper ( ASTContext Context,
CXXRecordDecl RD,
SourceLocation  SuperLoc,
SourceLocation  ColonColonLoc 
)

Turns this (empty) nested-name-specifier into '__super' nested-name-specifier.

Parameters:
ContextThe AST context in which this nested-name-specifier resides.
RDThe declaration of the class in which nested-name-specifier appeared.
SuperLocThe location of the '__super' keyword. name.
ColonColonLocThe location of the trailing '::'.

Definition at line 590 of file NestedNameSpecifier.cpp.

References clang::NestedNameSpecifier::SuperSpecifier().

Referenced by clang::CXXScopeSpec::MakeSuper(), and clang::ASTReader::ReadNestedNameSpecifierLoc().

NestedNameSpecifierLocBuilder & NestedNameSpecifierLocBuilder::operator= ( const NestedNameSpecifierLocBuilder Other)

Definition at line 497 of file NestedNameSpecifier.cpp.


The documentation for this class was generated from the following files: