clang 20.0.0git
|
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 DeclarationNameLoc & | getInfo () const |
void | setInfo (const DeclarationNameLoc &Info) |
TypeSourceInfo * | getNamedTypeInfo () 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 |
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.
|
default |
|
inline |
Definition at line 783 of file DeclarationName.h.
|
inline |
Definition at line 786 of file DeclarationName.h.
bool DeclarationNameInfo::containsUnexpandedParameterPack | ( | ) | const |
Determine whether this name contains an unexpanded parameter pack.
Definition at line 407 of file DeclarationName.cpp.
References clang::Type::containsUnexpandedParameterPack(), clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDeductionGuideName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, clang::DeclarationName::CXXUsingDirective, clang::DeclarationName::getCXXNameType(), clang::DeclarationNameLoc::getNamedTypeInfo(), clang::DeclarationName::getNameKind(), clang::DeclarationName::Identifier, clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, and clang::DeclarationName::ObjCZeroArgSelector.
Referenced by clang::Sema::ActOnUsingDeclaration().
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().
|
inline |
getBeginLoc - Retrieve the location of the first token.
Definition at line 870 of file DeclarationName.h.
Referenced by clang::Sema::ActOnFriendFunctionDecl(), actOnOMPReductionKindClause(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::diagnoseExprIntendedAsTemplateName(), clang::ConceptReference::getBeginLoc(), clang::DeclRefExpr::getBeginLoc(), clang::UnresolvedLookupExpr::getBeginLoc(), clang::CXXDependentScopeMemberExpr::getBeginLoc(), clang::UnresolvedMemberExpr::getBeginLoc(), getFunNameText(), and clang::FunctionDecl::getReturnTypeSourceRange().
|
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().
|
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().
|
inline |
Definition at line 877 of file DeclarationName.h.
References clang::SourceLocation::isValid().
Referenced by actOnOMPReductionKindClause(), clang::Sema::ActOnUsingDeclaration(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildDependentDeclRefExpr(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::CheckUsingDeclQualifier(), clang::ConceptReference::getEndLoc(), clang::DeclRefExpr::getEndLoc(), clang::MemberExpr::getEndLoc(), clang::UnresolvedLookupExpr::getEndLoc(), clang::CXXDependentScopeMemberExpr::getEndLoc(), clang::UnresolvedMemberExpr::getEndLoc(), and getFunNameText().
|
inline |
Definition at line 802 of file DeclarationName.h.
Referenced by clang::ASTRecordWriter::AddDeclarationNameInfo(), clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::BuildLiteralOperatorCall(), clang::Sema::CreateOverloadedArraySubscriptExpr(), and clang::Sema::InstantiateFunctionDefinition().
|
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().
|
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().
|
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().
|
inline |
getSourceRange - The range of the declaration name.
Definition at line 873 of file DeclarationName.h.
Referenced by clang::Sema::ActOnDependentMemberExpr(), CheckConstexprFunctionBody(), clang::Sema::CheckFriendAccess(), clang::Sema::CheckInheritingConstructorUsingDecl(), and clang::TypoCorrection::setCorrectionRange().
bool DeclarationNameInfo::isInstantiationDependent | ( | ) | const |
Determine whether this name involves a template parameter.
Definition at line 430 of file DeclarationName.cpp.
References clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDeductionGuideName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, clang::DeclarationName::CXXUsingDirective, clang::DeclarationName::getCXXNameType(), clang::DeclarationNameLoc::getNamedTypeInfo(), clang::DeclarationName::getNameKind(), clang::DeclarationName::Identifier, clang::Type::isInstantiationDependentType(), clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, and clang::DeclarationName::ObjCZeroArgSelector.
void DeclarationNameInfo::printName | ( | raw_ostream & | OS, |
PrintingPolicy | Policy | ||
) | const |
printName - Print the human-readable name to a stream.
Definition at line 466 of file DeclarationName.cpp.
References clang::PrintingPolicy::adjustForCPlusPlus(), clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDeductionGuideName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, clang::DeclarationName::CXXUsingDirective, clang::DeclarationNameLoc::getNamedTypeInfo(), clang::DeclarationName::getNameKind(), clang::DeclarationName::Identifier, clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, clang::DeclarationName::ObjCZeroArgSelector, clang::DeclarationName::print(), and clang::PrintingPolicy::SuppressScope.
Referenced by clang::operator<<(), and clang::ConceptReference::print().
|
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().
|
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().
|
inline |
Definition at line 803 of file DeclarationName.h.
Referenced by clang::ASTRecordReader::readDeclarationNameInfo().
|
inline |
setLoc - Sets the main location of the declaration name.
Definition at line 800 of file DeclarationName.h.
Referenced by checkMappableExpressionList(), clang::Sema::GetNameFromUnqualifiedId(), isImplicitMapperNeeded(), clang::Sema::LookupInlineAsmVarDeclField(), processImplicitMapsWithDefaultMappers(), and clang::ASTRecordReader::readDeclarationNameInfo().
|
inline |
setName - Sets the embedded declaration name.
Definition at line 794 of file DeclarationName.h.
Referenced by clang::TemplateDeclInstantiator::adjustForRewrite(), clang::Sema::BuildUsingDeclaration(), checkMappableExpressionList(), clang::Sema::GetNameFromUnqualifiedId(), isImplicitMapperNeeded(), clang::Sema::LookupInlineAsmVarDeclField(), processImplicitMapsWithDefaultMappers(), clang::ASTRecordReader::readDeclarationNameInfo(), clang::LookupResult::setLookupName(), and clang::TreeTransform< Derived >::TransformDeclarationNameInfo().
|
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().