clang 22.0.0git
|
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 "clang/AST/NestedNameSpecifierBase.h"
Public Member Functions | |
NestedNameSpecifierLocBuilder ()=default | |
NestedNameSpecifierLocBuilder (const NestedNameSpecifierLocBuilder &Other) | |
NestedNameSpecifierLocBuilder & | operator= (const NestedNameSpecifierLocBuilder &Other) |
~NestedNameSpecifierLocBuilder () | |
NestedNameSpecifier | getRepresentation () const |
Retrieve the representation of the nested-name-specifier. | |
void | Make (ASTContext &Context, TypeLoc TL, SourceLocation ColonColonLoc) |
Make a nested-name-specifier of the form 'type::'. | |
void | Extend (ASTContext &Context, const NamespaceBaseDecl *Namespace, SourceLocation NamespaceLoc, SourceLocation ColonColonLoc) |
Extend the current nested-name-specifier by another nested-name-specifier component of the form 'namespace::'. | |
void | MakeGlobal (ASTContext &Context, SourceLocation ColonColonLoc) |
Turn this (empty) nested-name-specifier into the global nested-name-specifier '::'. | |
void | MakeMicrosoftSuper (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 *, 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 423 of file NestedNameSpecifierBase.h.
|
default |
References NestedNameSpecifierLocBuilder(), and clang::Other.
Referenced by NestedNameSpecifierLocBuilder(), NestedNameSpecifierLocBuilder(), and operator=().
NestedNameSpecifierLocBuilder::NestedNameSpecifierLocBuilder | ( | const NestedNameSpecifierLocBuilder & | Other | ) |
Definition at line 193 of file NestedNameSpecifier.cpp.
References Append(), clang::if(), NestedNameSpecifierLocBuilder(), and clang::Other.
|
inline |
Definition at line 454 of file NestedNameSpecifierBase.h.
void NestedNameSpecifierLocBuilder::Adopt | ( | NestedNameSpecifierLoc | Other | ) |
Adopt an existing nested-name-specifier (with source-range information).
Definition at line 318 of file NestedNameSpecifier.cpp.
References clang::Other.
|
inline |
Clear out this builder, and prepare it to build another nested-name-specifier with source-location information.
Definition at line 545 of file NestedNameSpecifierBase.h.
void NestedNameSpecifierLocBuilder::Extend | ( | ASTContext & | Context, |
const NamespaceBaseDecl * | 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 260 of file NestedNameSpecifier.cpp.
References SaveSourceLocation().
|
inline |
Retrieve the underlying buffer.
Definition at line 555 of file NestedNameSpecifierBase.h.
|
inline |
Retrieve the representation of the nested-name-specifier.
Definition at line 460 of file NestedNameSpecifierBase.h.
|
inline |
Retrieve the source range covered by this nested-name-specifier.
Definition at line 247 of file NestedNameSpecifier.h.
References clang::NestedNameSpecifierLoc::getSourceRange().
|
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 539 of file NestedNameSpecifierBase.h.
References getTemporary().
Referenced by getTemporary().
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 338 of file NestedNameSpecifier.cpp.
References memcpy().
Referenced by clang::Sema::ActOnMSVCUnknownTypeName(), clang::ASTImporter::Import(), and clang::ASTRecordReader::readNestedNameSpecifierLoc().
void NestedNameSpecifierLocBuilder::Make | ( | ASTContext & | Context, |
TypeLoc | TL, | ||
SourceLocation | ColonColonLoc ) |
Make a nested-name-specifier of the form 'type::'.
Context | The AST context in which this nested-name-specifier resides. |
TL | The TypeLoc that describes the type preceding the '::'. |
ColonColonLoc | The location of the trailing '::'. |
Definition at line 250 of file NestedNameSpecifier.cpp.
References clang::TypeLoc::getOpaqueData(), clang::TypeLoc::getTypePtr(), SavePointer(), and SaveSourceLocation().
void NestedNameSpecifierLocBuilder::MakeGlobal | ( | ASTContext & | Context, |
SourceLocation | ColonColonLoc ) |
Turn this (empty) nested-name-specifier into the global nested-name-specifier '::'.
Definition at line 271 of file NestedNameSpecifier.cpp.
References clang::NestedNameSpecifier::getGlobal(), and SaveSourceLocation().
void NestedNameSpecifierLocBuilder::MakeMicrosoftSuper | ( | ASTContext & | Context, |
CXXRecordDecl * | RD, | ||
SourceLocation | SuperLoc, | ||
SourceLocation | ColonColonLoc ) |
Turns this (empty) nested-name-specifier into '__super' nested-name-specifier.
Context | The AST context in which this nested-name-specifier resides. |
RD | The declaration of the class in which nested-name-specifier appeared. |
SuperLoc | The location of the '__super' keyword. name. |
ColonColonLoc | The location of the trailing '::'. |
Definition at line 280 of file NestedNameSpecifier.cpp.
References SaveSourceLocation().
|
inline |
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 513 of file NestedNameSpecifierBase.h.
Referenced by clang::Sema::ActOnMSVCUnknownTypeName(), clang::Sema::BuildUsingDeclaration(), clang::MemberPointerTypeLoc::initializeLocal(), clang::TagTypeLoc::initializeLocal(), clang::TemplateSpecializationTypeLoc::initializeLocal(), initializeQualifier(), and clang::TreeTransform< Derived >::TransformTemplateName().
NestedNameSpecifierLocBuilder & NestedNameSpecifierLocBuilder::operator= | ( | const NestedNameSpecifierLocBuilder & | Other | ) |
Definition at line 212 of file NestedNameSpecifier.cpp.
References Append(), memcpy(), NestedNameSpecifierLocBuilder(), and clang::Other.