clang API Documentation

Public Member Functions | Friends
clang::NestedNameSpecifierLoc Class Reference

A C++ nested-name-specifier augmented with source location information. More...

#include <NestedNameSpecifier.h>

List of all members.

Public Member Functions

 NestedNameSpecifierLoc ()
 Construct an empty nested-name-specifier.
 NestedNameSpecifierLoc (NestedNameSpecifier *Qualifier, void *Data)
 Construct a nested-name-specifier with source location information from.
LLVM_EXPLICIT operator bool () const
 Evalutes true when this nested-name-specifier location is non-empty.
bool hasQualifier () const
 Evalutes true when this nested-name-specifier location is empty.
NestedNameSpecifiergetNestedNameSpecifier () const
 Retrieve the nested-name-specifier to which this instance refers.
void * getOpaqueData () const
 Retrieve the opaque pointer that refers to source-location data.
SourceRange getSourceRange () const LLVM_READONLY
 Retrieve the source range covering the entirety of this nested-name-specifier.
SourceRange getLocalSourceRange () const
 Retrieve the source range covering just the last part of this nested-name-specifier, not including the prefix.
SourceLocation getBeginLoc () const
 Retrieve the location of the beginning of this nested-name-specifier.
SourceLocation getEndLoc () const
 Retrieve the location of the end of this nested-name-specifier.
SourceLocation getLocalBeginLoc () const
 Retrieve the location of the beginning of this component of the nested-name-specifier.
SourceLocation getLocalEndLoc () const
 Retrieve the location of the end of this component of the nested-name-specifier.
NestedNameSpecifierLoc getPrefix () const
 Return the prefix of this nested-name-specifier.
TypeLoc getTypeLoc () const
 For a nested-name-specifier that refers to a type, retrieve the type with source-location information.
unsigned getDataLength () const
 Determines the data length for the entire nested-name-specifier.

Friends

bool operator== (NestedNameSpecifierLoc X, NestedNameSpecifierLoc Y)
bool operator!= (NestedNameSpecifierLoc X, NestedNameSpecifierLoc Y)

Detailed Description

A C++ nested-name-specifier augmented with source location information.

Definition at line 225 of file NestedNameSpecifier.h.


Constructor & Destructor Documentation

Construct an empty nested-name-specifier.

Definition at line 239 of file NestedNameSpecifier.h.

Referenced by getPrefix().

Construct a nested-name-specifier with source location information from.

Definition at line 243 of file NestedNameSpecifier.h.


Member Function Documentation

unsigned clang::NestedNameSpecifierLoc::getDataLength ( ) const [inline]

Determines the data length for the entire nested-name-specifier.

Definition at line 322 of file NestedNameSpecifier.h.

References getDataLength().

Referenced by getDataLength(), getLocalSourceRange(), and getTypeLoc().

Retrieve the location of the end of this nested-name-specifier.

Definition at line 287 of file NestedNameSpecifier.h.

References clang::SourceRange::getEnd(), and getSourceRange().

Referenced by clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc().

Retrieve the location of the beginning of this component of the nested-name-specifier.

Definition at line 293 of file NestedNameSpecifier.h.

References clang::SourceRange::getBegin(), and getLocalSourceRange().

Referenced by clang::CXXScopeSpec::getLastQualifierNameLoc(), and clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc().

Retrieve the location of the end of this component of the nested-name-specifier.

Definition at line 299 of file NestedNameSpecifier.h.

References clang::SourceRange::getEnd(), and getLocalSourceRange().

Referenced by clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc().

Retrieve the source range covering just the last part of this nested-name-specifier, not including the prefix.

For example, if this instance refers to a nested-name-specifier ::std::vector<int>::, the returned source range would cover from "vector" to the last '::'.

Definition at line 394 of file NestedNameSpecifier.cpp.

References clang::NestedNameSpecifier::getAsType(), getDataLength(), clang::NestedNameSpecifier::getKind(), clang::NestedNameSpecifier::getPrefix(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::Super, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.

Referenced by clang::ASTWriter::AddNestedNameSpecifierLoc(), getLocalBeginLoc(), getLocalEndLoc(), and getSourceRange().

Return the prefix of this nested-name-specifier.

For example, if this instance refers to a nested-name-specifier ::std::vector<int>::, the prefix is ::std::. Note that the returned prefix may be empty, if this is the first component of the nested-name-specifier.

Definition at line 309 of file NestedNameSpecifier.h.

References clang::NestedNameSpecifier::getPrefix(), and NestedNameSpecifierLoc().

Referenced by clang::ASTWriter::AddNestedNameSpecifierLoc(), clang::Sema::diagnoseQualifiedDeclaration(), getSourceRange(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), and clang::RecursiveASTVisitor< Derived >::TraverseNestedNameSpecifierLoc().

Retrieve the source range covering the entirety of this nested-name-specifier.

For example, if this instance refers to a nested-name-specifier ::std::vector<int>::, the returned source range would cover from the initial '::' to the last '::'.

Definition at line 382 of file NestedNameSpecifier.cpp.

References clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), getLocalSourceRange(), and getPrefix().

Referenced by clang::CXXScopeSpec::Adopt(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckFriendAccess(), clang::Sema::CheckUsingShadowDecl(), getBeginLoc(), getEndLoc(), clang::NestedNameSpecifierLocBuilder::getSourceRange(), and clang::TreeTransform< Derived >::RebuildDependentNameType().

Evalutes true when this nested-name-specifier location is empty.

Definition at line 252 of file NestedNameSpecifier.h.

Referenced by clang::CXXPseudoDestructorExpr::hasQualifier().

LLVM_EXPLICIT clang::NestedNameSpecifierLoc::operator bool ( ) const [inline]

Evalutes true when this nested-name-specifier location is non-empty.

Definition at line 248 of file NestedNameSpecifier.h.


Friends And Related Function Documentation

bool operator!= ( NestedNameSpecifierLoc  X,
NestedNameSpecifierLoc  Y 
) [friend]

Definition at line 329 of file NestedNameSpecifier.h.

bool operator== ( NestedNameSpecifierLoc  X,
NestedNameSpecifierLoc  Y 
) [friend]

Definition at line 324 of file NestedNameSpecifier.h.


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