clang API Documentation

Public Member Functions
clang::DeclarationNameInfo Struct Reference

#include <DeclarationName.h>

List of all members.

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.
void setName (DeclarationName N)
 setName - Sets the embedded declaration name.
SourceLocation getLoc () const
 getLoc - Returns the main location of the declaration name.
void setLoc (SourceLocation L)
 setLoc - Sets the main location of the declaration name.
const DeclarationNameLocgetInfo () const
DeclarationNameLocgetInfo ()
void setInfo (const DeclarationNameLoc &Info)
TypeSourceInfogetNamedTypeInfo () const
void setNamedTypeInfo (TypeSourceInfo *TInfo)
SourceRange getCXXOperatorNameRange () const
void setCXXOperatorNameRange (SourceRange R)
SourceLocation getCXXLiteralOperatorNameLoc () const
void setCXXLiteralOperatorNameLoc (SourceLocation Loc)
bool isInstantiationDependent () const
 Determine whether this name involves a template parameter.
bool containsUnexpandedParameterPack () const
 Determine whether this name contains an unexpanded parameter pack.
std::string getAsString () const
 getAsString - Retrieve the human-readable string for this name.
void printName (raw_ostream &OS) const
 printName - Print the human-readable name to a stream.
SourceLocation getBeginLoc () const
 getBeginLoc - Retrieve the location of the first token.
SourceLocation getEndLoc () const
 getEndLoc - Retrieve the location of the last token.
SourceRange getSourceRange () const LLVM_READONLY
 getSourceRange - The range of the declaration name.
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 425 of file DeclarationName.h.


Constructor & Destructor Documentation

clang::DeclarationNameInfo::DeclarationNameInfo ( ) [inline]

Definition at line 436 of file DeclarationName.h.

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

Definition at line 438 of file DeclarationName.h.

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

Definition at line 441 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 509 of file DeclarationName.cpp.

References printName().

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

getBeginLoc - Retrieve the location of the first token.

Definition at line 523 of file DeclarationName.h.

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

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

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

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

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

References clang::DeclarationName::CXXOperatorName, clang::DeclarationNameLoc::CXXOperatorName, and clang::SourceLocation::getFromRawEncoding().

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

SourceLocation DeclarationNameInfo::getEndLoc ( ) const
const DeclarationNameLoc& clang::DeclarationNameInfo::getInfo ( ) const [inline]
DeclarationNameLoc& clang::DeclarationNameInfo::getInfo ( ) [inline]

Definition at line 456 of file DeclarationName.h.

SourceLocation clang::DeclarationNameInfo::getLoc ( ) const [inline]
SourceLocation clang::DeclarationNameInfo::getLocEnd ( ) const [inline]
SourceLocation clang::DeclarationNameInfo::getLocStart ( ) const [inline]

Definition at line 532 of file DeclarationName.h.

References getBeginLoc().

Referenced by getLocEnd(), and clang::DeclRefExpr::getLocStart().

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

getName - Returns the embedded declaration name.

Definition at line 446 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::ActOnUsingDeclaration(), clang::ASTWriter::AddDeclarationNameInfo(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildPossibleImplicitMemberExpr(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildQualifiedTemplateIdExpr(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckMicrosoftIfExistsSymbol(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CorrectTypo(), 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(), clang::Sema::HandleDeclarator(), clang::ASTNodeImporter::ImportDeclarationNameLoc(), clang::MemberExpr::MemberExpr(), clang::ASTReader::ReadDeclarationNameInfo(), clang::Sema::SubstDeclarationNameInfo(), clang::TreeTransform< Derived >::TransformDeclarationNameInfo(), and clang::RecursiveASTVisitor< Derived >::TraverseDeclarationNameInfo().

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]

setCXXLiteralOperatorNameLoc - Sets 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, and clang::SourceLocation::getRawEncoding().

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

void clang::DeclarationNameInfo::setCXXOperatorNameRange ( SourceRange  R) [inline]
void clang::DeclarationNameInfo::setInfo ( const DeclarationNameLoc Info) [inline]

Definition at line 457 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 453 of file DeclarationName.h.

Referenced by clang::Sema::GetNameFromUnqualifiedId(), 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: