clang  6.0.0svn
Public Member Functions | List of all members
clang::DeclarationNameInfo Struct Reference

DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnding source/type location info. More...

#include "clang/AST/DeclarationName.h"

Public Member Functions

 DeclarationNameInfo ()
 
 DeclarationNameInfo (DeclarationName Name, SourceLocation NameLoc)
 
 DeclarationNameInfo (DeclarationName Name, SourceLocation NameLoc, DeclarationNameLoc LocInfo)
 
DeclarationName getName () const
 getName - Returns the embedded declaration name. More...
 
void setName (DeclarationName N)
 setName - Sets the embedded declaration name. More...
 
SourceLocation getLoc () const
 getLoc - Returns the main location of the declaration name. More...
 
void setLoc (SourceLocation L)
 setLoc - Sets the main location of the declaration name. More...
 
const DeclarationNameLocgetInfo () const
 
DeclarationNameLocgetInfo ()
 
void setInfo (const DeclarationNameLoc &Info)
 
TypeSourceInfogetNamedTypeInfo () const
 getNamedTypeInfo - Returns the source type info associated to the name. More...
 
void setNamedTypeInfo (TypeSourceInfo *TInfo)
 setNamedTypeInfo - Sets the source type info associated to the name. More...
 
SourceRange getCXXOperatorNameRange () const
 getCXXOperatorNameRange - Gets the range of the operator name (without the operator keyword). More...
 
void setCXXOperatorNameRange (SourceRange R)
 setCXXOperatorNameRange - Sets the range of the operator name (without the operator keyword). More...
 
SourceLocation getCXXLiteralOperatorNameLoc () const
 getCXXLiteralOperatorNameLoc - Returns the location of the literal operator name (not the operator keyword). More...
 
void setCXXLiteralOperatorNameLoc (SourceLocation Loc)
 setCXXLiteralOperatorNameLoc - Sets the location of the literal operator name (not the operator keyword). More...
 
bool isInstantiationDependent () const
 Determine whether this name involves a template parameter. More...
 
bool containsUnexpandedParameterPack () const
 Determine whether this name contains an unexpanded parameter pack. More...
 
std::string getAsString () const
 getAsString - Retrieve the human-readable string for this name. More...
 
void printName (raw_ostream &OS) const
 printName - Print the human-readable name to a stream. More...
 
SourceLocation getBeginLoc () const
 getBeginLoc - Retrieve the location of the first token. More...
 
SourceLocation getEndLoc () const
 getEndLoc - Retrieve the location of the last token. More...
 
SourceRange getSourceRange () const LLVM_READONLY
 getSourceRange - The range of the declaration name. More...
 
SourceLocation getLocStart () const LLVM_READONLY
 
SourceLocation getLocEnd () const LLVM_READONLY
 

Detailed Description

DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnding source/type location info.

Definition at line 438 of file DeclarationName.h.

Constructor & Destructor Documentation

◆ DeclarationNameInfo() [1/3]

clang::DeclarationNameInfo::DeclarationNameInfo ( )
inline

Definition at line 449 of file DeclarationName.h.

◆ DeclarationNameInfo() [2/3]

clang::DeclarationNameInfo::DeclarationNameInfo ( DeclarationName  Name,
SourceLocation  NameLoc 
)
inline

Definition at line 451 of file DeclarationName.h.

◆ DeclarationNameInfo() [3/3]

clang::DeclarationNameInfo::DeclarationNameInfo ( DeclarationName  Name,
SourceLocation  NameLoc,
DeclarationNameLoc  LocInfo 
)
inline

Definition at line 454 of file DeclarationName.h.

Member Function Documentation

◆ containsUnexpandedParameterPack()

bool DeclarationNameInfo::containsUnexpandedParameterPack ( ) const

Determine whether this name contains an unexpanded parameter pack.

Definition at line 586 of file DeclarationName.cpp.

Referenced by clang::CXXUnresolvedConstructExpr::getLocStart(), and clang::OverloadExpr::getNamingClass().

◆ getAsString()

std::string DeclarationNameInfo::getAsString ( ) const

getAsString - Retrieve the human-readable string for this name.

Definition at line 632 of file DeclarationName.cpp.

References clang::Result.

◆ getBeginLoc()

SourceLocation clang::DeclarationNameInfo::getBeginLoc ( ) const
inline

getBeginLoc - Retrieve the location of the first token.

Definition at line 536 of file DeclarationName.h.

Referenced by clang::CXXDependentScopeMemberExpr::getLocStart(), and getVarTemplateSpecialization().

◆ getCXXLiteralOperatorNameLoc()

SourceLocation clang::DeclarationNameInfo::getCXXLiteralOperatorNameLoc ( ) const
inline

getCXXLiteralOperatorNameLoc - Returns the location of the literal operator name (not the operator keyword).

Assumes it is a literal operator.

Definition at line 509 of file DeclarationName.h.

References clang::DeclarationNameLoc::CXXLiteralOperatorName, clang::DeclarationName::getNameKind(), and clang::DeclarationNameLoc::CXXLitOpName::OpNameLoc.

Referenced by clang::Sema::BuildLiteralOperatorCall(), and clang::ASTNodeImporter::ImportDeclarationNameLoc().

◆ getCXXOperatorNameRange()

SourceRange clang::DeclarationNameInfo::getCXXOperatorNameRange ( ) const
inline

getCXXOperatorNameRange - Gets the range of the operator name (without the operator keyword).

Assumes it is a (non-literal) operator.

Definition at line 491 of file DeclarationName.h.

References clang::DeclarationNameLoc::CXXOpName::BeginOpNameLoc, clang::DeclarationNameLoc::CXXOperatorName, clang::DeclarationNameLoc::CXXOpName::EndOpNameLoc, and clang::DeclarationName::getNameKind().

Referenced by clang::ASTNodeImporter::ImportDeclarationNameLoc().

◆ getEndLoc()

SourceLocation DeclarationNameInfo::getEndLoc ( ) const

getEndLoc - Retrieve the location of the last token.

Definition at line 673 of file DeclarationName.cpp.

Referenced by clang::Sema::BuildQualifiedDeclarationNameExpr(), and clang::CXXDependentScopeMemberExpr::getLocEnd().

◆ getInfo() [1/2]

const DeclarationNameLoc& clang::DeclarationNameInfo::getInfo ( ) const
inline

◆ getInfo() [2/2]

DeclarationNameLoc& clang::DeclarationNameInfo::getInfo ( )
inline

Definition at line 469 of file DeclarationName.h.

◆ getLoc()

SourceLocation clang::DeclarationNameInfo::getLoc ( ) const
inline

◆ getLocEnd()

SourceLocation clang::DeclarationNameInfo::getLocEnd ( ) const
inline

Definition at line 546 of file DeclarationName.h.

References clang::SourceLocation::isValid().

Referenced by clang::Sema::CheckUsingDeclQualifier().

◆ getLocStart()

SourceLocation clang::DeclarationNameInfo::getLocStart ( ) const
inline

Definition at line 543 of file DeclarationName.h.

◆ getName()

DeclarationName clang::DeclarationNameInfo::getName ( ) const
inline

◆ getNamedTypeInfo()

TypeSourceInfo* clang::DeclarationNameInfo::getNamedTypeInfo ( ) const
inline

getNamedTypeInfo - Returns the source type info associated to the name.

Assumes it is a constructor, destructor or conversion.

Definition at line 474 of file DeclarationName.h.

References clang::DeclarationName::getNameKind(), clang::DeclarationNameLoc::NamedType, and clang::DeclarationNameLoc::NT::TInfo.

Referenced by clang::Sema::DiagnoseUnexpandedParameterPack(), clang::ASTNodeImporter::ImportDeclarationNameLoc(), and clang::RecursiveASTVisitor< CallGraph >::TraverseDeclarationNameInfo().

◆ getSourceRange()

SourceRange clang::DeclarationNameInfo::getSourceRange ( ) const
inline

◆ isInstantiationDependent()

bool DeclarationNameInfo::isInstantiationDependent ( ) const

Determine whether this name involves a template parameter.

Definition at line 609 of file DeclarationName.cpp.

Referenced by clang::OverloadExpr::getNamingClass().

◆ printName()

void DeclarationNameInfo::printName ( raw_ostream &  OS) const

printName - Print the human-readable name to a stream.

Definition at line 639 of file DeclarationName.cpp.

Referenced by clang::operator<<().

◆ setCXXLiteralOperatorNameLoc()

void clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc ( SourceLocation  Loc)
inline

setCXXLiteralOperatorNameLoc - Sets the location of the literal operator name (not the operator keyword).

Assumes it is a literal operator.

Definition at line 517 of file DeclarationName.h.

References clang::DeclarationNameLoc::CXXLiteralOperatorName, clang::getAsString(), clang::DeclarationName::getNameKind(), clang::SourceLocation::getRawEncoding(), and clang::DeclarationNameLoc::CXXLitOpName::OpNameLoc.

Referenced by BuildCookedLiteralOperatorCall(), and clang::ASTNodeImporter::ImportDeclarationNameLoc().

◆ setCXXOperatorNameRange()

void clang::DeclarationNameInfo::setCXXOperatorNameRange ( SourceRange  R)
inline

◆ setInfo()

void clang::DeclarationNameInfo::setInfo ( const DeclarationNameLoc Info)
inline

Definition at line 470 of file DeclarationName.h.

Referenced by clang::ASTReader::ReadDeclarationNameInfo().

◆ setLoc()

void clang::DeclarationNameInfo::setLoc ( SourceLocation  L)
inline

setLoc - Sets the main location of the declaration name.

Definition at line 466 of file DeclarationName.h.

Referenced by clang::ASTReader::ReadDeclarationNameInfo().

◆ setName()

void clang::DeclarationNameInfo::setName ( DeclarationName  N)
inline

setName - Sets the embedded declaration name.

Definition at line 461 of file DeclarationName.h.

Referenced by clang::Sema::BuildUsingDeclaration(), and clang::ASTReader::ReadDeclarationNameInfo().

◆ setNamedTypeInfo()

void clang::DeclarationNameInfo::setNamedTypeInfo ( TypeSourceInfo TInfo)
inline

setNamedTypeInfo - Sets the source type info associated to the name.

Assumes it is a constructor, destructor or conversion.

Definition at line 482 of file DeclarationName.h.

References clang::DeclarationName::getNameKind(), clang::DeclarationNameLoc::NamedType, and clang::DeclarationNameLoc::NT::TInfo.

Referenced by clang::ASTNodeImporter::ImportDeclarationNameLoc().


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