clang 22.0.0git
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 796 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 811 of file DeclarationName.h.

◆ DeclarationNameInfo() [3/3]

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

Definition at line 814 of file DeclarationName.h.

Member Function Documentation

◆ containsUnexpandedParameterPack()

◆ getAsString()

std::string DeclarationNameInfo::getAsString ( ) const

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

Definition at line 452 of file DeclarationName.cpp.

References clang::Result.

Referenced by buildUserDefinedMapperRef().

◆ getBeginLoc()

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

References clang::DeclarationName::CXXLiteralOperatorName.

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

References clang::DeclarationName::CXXOperatorName.

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

◆ getEndLoc()

◆ getInfo()

◆ getLoc()

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

getLoc - Returns the main location of the declaration name.

Definition at line 825 of file DeclarationName.h.

Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnIdExpression(), actOnOMPReductionKindClause(), clang::SemaOpenMP::ActOnOpenMPIdExpression(), 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::CreateOverloadedArraySubscriptExpr(), clang::Sema::DiagnoseClassNameShadow(), clang::Sema::diagnoseExprIntendedAsTemplateName(), diagnoseInstanceReference(), DiagnoseQualifiedMemberReference(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::ConceptReference::getConceptNameLoc(), hasUserDefinedMapper(), clang::ASTNodeImporter::import(), clang::SemaOpenMP::lookupOpenMPDeclareTargetName(), recoverFromMSUnqualifiedLookup(), clang::Sema::SubstDeclarationNameInfo(), clang::TreeTransform< Derived >::TransformDeclarationNameInfo(), clang::ASTNodeImporter::VisitDependentScopeDeclRefExpr(), clang::ASTNodeImporter::VisitMemberExpr(), clang::ASTNodeImporter::VisitUnresolvedUsingValueDecl(), and clang::ASTNodeImporter::VisitUsingDecl().

◆ getName()

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

getName - Returns the embedded declaration name.

Definition at line 819 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::SemaOpenMP::ActOnOpenMPIdExpression(), clang::Sema::ActOnTemplateName(), clang::Sema::ActOnUsingDeclaration(), clang::Sema::ActOnVariableDeclarator(), clang::ASTRecordWriter::AddDeclarationNameInfo(), argumentDependentLookup(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildPossibleImplicitMemberExpr(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildQualifiedTemplateIdExpr(), buildUserDefinedMapperRef(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckFunctionOrTemplateParamDeclarator(), clang::Sema::CheckMicrosoftIfExistsSymbol(), checkNestingOfRegions(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CheckUsingDeclQualifier(), clang::Sema::ClassifyName(), clang::Sema::CorrectTypo(), clang::CXXConstructorDecl::Create(), clang::CXXConversionDecl::Create(), clang::CXXDestructorDecl::Create(), CreateNewFunctionDecl(), clang::Sema::DiagnoseClassNameShadow(), clang::Sema::diagnoseExprIntendedAsTemplateName(), diagnoseInstanceReference(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::Sema::FindInstantiatedDecl(), handleCleanupAttr(), clang::Sema::HandleDeclarator(), handleRestrictAttr(), clang::ASTNodeImporter::import(), clang::ASTNodeImporter::ImportDeclarationNameLoc(), clang::Sema::InstantiateFunctionDefinition(), clang::SemaOpenMP::lookupOpenMPDeclareTargetName(), clang::ASTRecordReader::readDeclarationNameInfo(), recoverFromMSUnqualifiedLookup(), clang::Sema::SubstDeclarationNameInfo(), clang::TreeTransform< Derived >::TransformDeclarationNameInfo(), clang::transformOMPMappableExprListClause(), clang::RecursiveASTVisitor< Derived >::TraverseDeclarationNameInfo(), and clang::ASTNodeImporter::VisitMemberExpr().

◆ getNamedTypeInfo()

◆ getSourceRange()

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

◆ isInstantiationDependent()

◆ printName()

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

References clang::DeclarationName::CXXLiteralOperatorName, and clang::DeclarationNameLoc::makeCXXLiteralOperatorNameLoc().

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

References clang::DeclarationName::CXXOperatorName, and clang::DeclarationNameLoc::makeCXXOperatorNameLoc().

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

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

◆ setLoc()

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

◆ setName()

◆ setNamedTypeInfo()


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