clang  3.9.0
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 <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 433 of file DeclarationName.h.

Constructor & Destructor Documentation

clang::DeclarationNameInfo::DeclarationNameInfo ( )
inline

Definition at line 444 of file DeclarationName.h.

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

Definition at line 446 of file DeclarationName.h.

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

Definition at line 449 of file DeclarationName.h.

Member Function Documentation

bool DeclarationNameInfo::containsUnexpandedParameterPack ( ) const
std::string DeclarationNameInfo::getAsString ( ) const

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

Definition at line 542 of file DeclarationName.cpp.

References printName(), and clang::Result.

Referenced by clang::CodeGen::CodeGenFunction::EmitOMPCriticalDirective().

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

getBeginLoc - Retrieve the location of the first token.

Definition at line 531 of file DeclarationName.h.

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

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 504 of file DeclarationName.h.

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

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

SourceRange clang::DeclarationNameInfo::getCXXOperatorNameRange ( ) const
inline
SourceLocation DeclarationNameInfo::getEndLoc ( ) const
const DeclarationNameLoc& clang::DeclarationNameInfo::getInfo ( ) const
inline
DeclarationNameLoc& clang::DeclarationNameInfo::getInfo ( )
inline

Definition at line 464 of file DeclarationName.h.

SourceLocation clang::DeclarationNameInfo::getLoc ( ) const
inline
SourceLocation clang::DeclarationNameInfo::getLocEnd ( ) const
inline
SourceLocation clang::DeclarationNameInfo::getLocStart ( ) const
inline
DeclarationName clang::DeclarationNameInfo::getName ( ) const
inline

getName - Returns the embedded declaration name.

Definition at line 454 of file DeclarationName.h.

Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnDependentMemberExpr(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnIdExpression(), clang::Sema::ActOnMemberAccessExpr(), clang::Sema::ActOnOpenMPCriticalDirective(), clang::Sema::ActOnOpenMPDeclareTargetName(), clang::Sema::ActOnOpenMPIdExpression(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnUsingDeclaration(), clang::ASTRecordWriter::AddDeclarationNameInfo(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildPossibleImplicitMemberExpr(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildQualifiedTemplateIdExpr(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckMicrosoftIfExistsSymbol(), CheckNestingOfRegions(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CheckUsingDeclQualifier(), clang::Sema::CorrectTypo(), clang::Sema::CorrectTypoDelayed(), clang::CXXConstructorDecl::Create(), clang::CXXDestructorDecl::Create(), clang::CXXConversionDecl::Create(), CreateNewFunctionDecl(), clang::Sema::DiagnoseClassNameShadow(), diagnoseInstanceReference(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::DependentScopeDeclRefExpr::getDeclName(), clang::LookupResult::getLookupName(), clang::CXXDependentScopeMemberExpr::getMember(), clang::OverloadExpr::getName(), getVarTemplateSpecialization(), handleCleanupAttr(), clang::Sema::HandleDeclarator(), clang::ASTNodeImporter::ImportDeclarationNameLoc(), clang::MemberExpr::MemberExpr(), clang::ASTReader::ReadDeclarationNameInfo(), recoverFromMSUnqualifiedLookup(), clang::Sema::SubstDeclarationNameInfo(), clang::TreeTransform< Derived >::TransformDeclarationNameInfo(), clang::RecursiveASTVisitor< Derived >::TraverseDeclarationNameInfo(), and clang::ASTNodeImporter::VisitMemberExpr().

TypeSourceInfo* clang::DeclarationNameInfo::getNamedTypeInfo ( ) const
inline
SourceRange clang::DeclarationNameInfo::getSourceRange ( ) const
inline
bool DeclarationNameInfo::isInstantiationDependent ( ) const
void DeclarationNameInfo::printName ( raw_ostream &  OS) const
void clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc ( SourceLocation  Loc)
inline
void clang::DeclarationNameInfo::setCXXOperatorNameRange ( SourceRange  R)
inline
void clang::DeclarationNameInfo::setInfo ( const DeclarationNameLoc Info)
inline

Definition at line 465 of file DeclarationName.h.

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

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

setLoc - Sets the main location of the declaration name.

Definition at line 461 of file DeclarationName.h.

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

void clang::DeclarationNameInfo::setName ( DeclarationName  N)
inline
void clang::DeclarationNameInfo::setNamedTypeInfo ( TypeSourceInfo TInfo)
inline

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