clang 20.0.0git
Public Member Functions | List of all members
clang::DeclarationNameInfo Struct Reference

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

#include "clang/AST/DeclarationName.h"

Public Member Functions

 DeclarationNameInfo ()=default
 
 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
 
void setInfo (const DeclarationNameLoc &Info)
 
TypeSourceInfogetNamedTypeInfo () const
 getNamedTypeInfo - Returns the source type info associated to the name.
 
void setNamedTypeInfo (TypeSourceInfo *TInfo)
 setNamedTypeInfo - Sets the source type info associated to the name.
 
SourceRange getCXXOperatorNameRange () const
 getCXXOperatorNameRange - Gets the range of the operator name (without the operator keyword).
 
void setCXXOperatorNameRange (SourceRange R)
 setCXXOperatorNameRange - Sets the range of the operator name (without the operator keyword).
 
SourceLocation getCXXLiteralOperatorNameLoc () const
 getCXXLiteralOperatorNameLoc - Returns the location of the literal operator name (not the operator keyword).
 
void setCXXLiteralOperatorNameLoc (SourceLocation Loc)
 setCXXLiteralOperatorNameLoc - Sets the location of the literal operator name (not the operator keyword).
 
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, PrintingPolicy Policy) const
 printName - Print the human-readable name to a stream.
 
SourceLocation getBeginLoc () const
 getBeginLoc - Retrieve the location of the first token.
 
SourceRange getSourceRange () const LLVM_READONLY
 getSourceRange - The range of the declaration name.
 
SourceLocation getEndLoc () const LLVM_READONLY
 

Detailed Description

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

Definition at line 768 of file DeclarationName.h.

Constructor & Destructor Documentation

◆ DeclarationNameInfo() [1/3]

clang::DeclarationNameInfo::DeclarationNameInfo ( )
default

◆ DeclarationNameInfo() [2/3]

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

Definition at line 783 of file DeclarationName.h.

◆ DeclarationNameInfo() [3/3]

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

Definition at line 786 of file DeclarationName.h.

Member Function Documentation

◆ containsUnexpandedParameterPack()

bool DeclarationNameInfo::containsUnexpandedParameterPack ( ) const

◆ getAsString()

std::string DeclarationNameInfo::getAsString ( ) const

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

Definition at line 453 of file DeclarationName.cpp.

References clang::Result.

Referenced by buildUserDefinedMapperRef().

◆ getBeginLoc()

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

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

References clang::DeclarationNameLoc::getCXXLiteralOperatorNameLoc().

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

References clang::DeclarationNameLoc::getCXXOperatorNameRange().

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

◆ getEndLoc()

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

◆ getInfo()

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

◆ getLoc()

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

getLoc - Returns the main location of the declaration name.

Definition at line 797 of file DeclarationName.h.

Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnIdExpression(), actOnOMPReductionKindClause(), clang::ASTRecordWriter::AddDeclarationNameInfo(), clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildDeclRefExpr(), clang::Sema::BuildFieldReferenceExpr(), clang::Sema::BuildLiteralOperatorCall(), clang::Sema::BuildMemberExpr(), clang::Sema::BuildMemberReferenceExpr(), BuildMSPropertyRefExpr(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildQualifiedTemplateIdExpr(), buildUserDefinedMapperRef(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckConceptTemplateId(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CheckVarTemplateId(), clang::Sema::CorrectTypo(), clang::Sema::CorrectTypoDelayed(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::DiagnoseClassNameShadow(), clang::Sema::diagnoseExprIntendedAsTemplateName(), diagnoseInstanceReference(), DiagnoseQualifiedMemberReference(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::ConceptReference::getConceptNameLoc(), clang::DependentScopeDeclRefExpr::getLocation(), clang::CXXDependentScopeMemberExpr::getMemberLoc(), clang::OverloadExpr::getNameLoc(), clang::LookupResult::getNameLoc(), hasUserDefinedMapper(), clang::ASTNodeImporter::import(), recoverFromMSUnqualifiedLookup(), clang::Sema::SubstDeclarationNameInfo(), and clang::TreeTransform< Derived >::TransformDeclarationNameInfo().

◆ getName()

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

getName - Returns the embedded declaration name.

Definition at line 791 of file DeclarationName.h.

Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnDependentMemberExpr(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnIdExpression(), actOnOMPReductionKindClause(), clang::SemaOpenMP::ActOnOpenMPCriticalDirective(), clang::Sema::ActOnTemplateName(), clang::Sema::ActOnUsingDeclaration(), clang::Sema::ActOnVariableDeclarator(), clang::ASTRecordWriter::AddDeclarationNameInfo(), buildMemberCall(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildPossibleImplicitMemberExpr(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildQualifiedTemplateIdExpr(), buildUserDefinedMapperRef(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckFunctionOrTemplateParamDeclarator(), checkMappableExpressionList(), clang::Sema::CheckMicrosoftIfExistsSymbol(), checkNestingOfRegions(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CheckUsingDeclQualifier(), clang::Sema::ClassifyName(), clang::Sema::CorrectTypo(), clang::Sema::CorrectTypoDelayed(), clang::CXXDestructorDecl::Create(), clang::CXXConversionDecl::Create(), clang::CXXConstructorDecl::Create(), CreateNewFunctionDecl(), clang::Sema::DiagnoseClassNameShadow(), clang::Sema::diagnoseExprIntendedAsTemplateName(), diagnoseInstanceReference(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::Sema::FindInstantiatedDecl(), clang::DependentScopeDeclRefExpr::getDeclName(), clang::LookupResult::getLookupName(), clang::CXXDependentScopeMemberExpr::getMember(), clang::OverloadExpr::getName(), handleCleanupAttr(), clang::Sema::HandleDeclarator(), clang::ASTNodeImporter::import(), clang::ASTNodeImporter::ImportDeclarationNameLoc(), clang::ASTRecordReader::readDeclarationNameInfo(), recoverFromMSUnqualifiedLookup(), clang::Sema::SubstDeclarationNameInfo(), clang::TreeTransform< Derived >::TransformDeclarationNameInfo(), clang::transformOMPMappableExprListClause(), and clang::RecursiveASTVisitor< Derived >::TraverseDeclarationNameInfo().

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

References clang::DeclarationNameLoc::getNamedTypeInfo().

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

◆ getSourceRange()

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

◆ isInstantiationDependent()

bool DeclarationNameInfo::isInstantiationDependent ( ) const

◆ printName()

void DeclarationNameInfo::printName ( raw_ostream &  OS,
PrintingPolicy  Policy 
) const

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

References Loc.

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

◆ setCXXOperatorNameRange()

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

setCXXOperatorNameRange - Sets the range of the operator name (without the operator keyword).

Assumes it is a C++ operator.

Definition at line 834 of file DeclarationName.h.

Referenced by clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::GetNameFromUnqualifiedId(), and clang::ASTNodeImporter::ImportDeclarationNameLoc().

◆ setInfo()

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

Definition at line 803 of file DeclarationName.h.

Referenced by clang::ASTRecordReader::readDeclarationNameInfo().

◆ setLoc()

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

◆ setName()

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

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

Referenced by clang::Sema::BuildUsingDeclaration(), clang::Sema::GetNameFromUnqualifiedId(), clang::ASTNodeImporter::ImportDeclarationNameLoc(), clang::TreeTransform< Derived >::RebuildCXXPseudoDestructorExpr(), and clang::TreeTransform< Derived >::TransformDeclarationNameInfo().


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