clang
17.0.0git
|
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnding 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. 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 DeclarationNameLoc & | getInfo () const |
void | setInfo (const DeclarationNameLoc &Info) |
TypeSourceInfo * | getNamedTypeInfo () 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, PrintingPolicy Policy) const |
printName - Print the human-readable name to a stream. More... | |
SourceLocation | getBeginLoc () const |
getBeginLoc - Retrieve the location of the first token. More... | |
SourceRange | getSourceRange () const LLVM_READONLY |
getSourceRange - The range of the declaration name. More... | |
SourceLocation | getEndLoc () const LLVM_READONLY |
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnding source/type location info.
Definition at line 767 of file DeclarationName.h.
|
default |
|
inline |
Definition at line 782 of file DeclarationName.h.
|
inline |
Definition at line 785 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.
std::string DeclarationNameInfo::getAsString | ( | ) | const |
getAsString - Retrieve the human-readable string for this name.
Definition at line 453 of file DeclarationName.cpp.
References string().
Referenced by clang::interp::Function::getName().
|
inline |
getBeginLoc - Retrieve the location of the first token.
Definition at line 869 of file DeclarationName.h.
Referenced by clang::Sema::BuildDeclarationNameExpr(), clang::ConceptSpecializationExpr::getBeginLoc(), clang::DeclRefExpr::getBeginLoc(), clang::UnresolvedLookupExpr::getBeginLoc(), clang::CXXDependentScopeMemberExpr::getBeginLoc(), clang::UnresolvedMemberExpr::getBeginLoc(), 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 841 of file DeclarationName.h.
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 825 of file DeclarationName.h.
Referenced by clang::ASTNodeImporter::ImportDeclarationNameLoc().
|
inline |
Definition at line 876 of file DeclarationName.h.
References clang::SourceLocation::isValid().
Referenced by clang::Sema::BuildDeclarationNameExpr(), clang::Sema::CheckUsingDeclQualifier(), clang::ConceptSpecializationExpr::getEndLoc(), clang::DeclRefExpr::getEndLoc(), clang::UnresolvedLookupExpr::getEndLoc(), clang::MemberExpr::getEndLoc(), clang::CXXDependentScopeMemberExpr::getEndLoc(), and clang::UnresolvedMemberExpr::getEndLoc().
|
inline |
Definition at line 801 of file DeclarationName.h.
Referenced by clang::ASTRecordWriter::AddDeclarationNameInfo(), clang::Sema::BuildLiteralOperatorCall(), and clang::Sema::CreateOverloadedArraySubscriptExpr().
|
inline |
getLoc - Returns the main location of the declaration name.
Definition at line 796 of file DeclarationName.h.
Referenced by clang::ASTRecordWriter::AddDeclarationNameInfo(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildDeclRefExpr(), clang::Sema::BuildLiteralOperatorCall(), clang::Sema::BuildQualifiedTemplateIdExpr(), clang::Sema::CheckVarTemplateId(), clang::Sema::CreateOverloadedArraySubscriptExpr(), diagnoseInstanceReference(), DiagnoseQualifiedMemberReference(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::ConceptReference::getConceptNameLoc(), clang::DependentScopeDeclRefExpr::getLocation(), clang::CXXDependentScopeMemberExpr::getMemberLoc(), clang::LookupResult::getNameLoc(), clang::OverloadExpr::getNameLoc(), clang::Sema::SubstDeclarationNameInfo(), clang::ASTNodeImporter::VisitDependentScopeDeclRefExpr(), and clang::ASTNodeImporter::VisitMemberExpr().
|
inline |
getName - Returns the embedded declaration name.
Definition at line 790 of file DeclarationName.h.
Referenced by clang::Sema::ActOnDependentMemberExpr(), clang::Sema::ActOnOpenMPCriticalDirective(), clang::ASTRecordWriter::AddDeclarationNameInfo(), clang::Sema::BuildQualifiedTemplateIdExpr(), checkMappableExpressionList(), clang::Sema::CheckUsingDeclQualifier(), clang::CXXConstructorDecl::Create(), clang::CXXDestructorDecl::Create(), clang::CXXConversionDecl::Create(), diagnoseInstanceReference(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::DependentScopeDeclRefExpr::getDeclName(), clang::LookupResult::getLookupName(), clang::CXXDependentScopeMemberExpr::getMember(), clang::OverloadExpr::getName(), clang::ASTNodeImporter::ImportDeclarationNameLoc(), clang::ASTRecordReader::readDeclarationNameInfo(), clang::Sema::SubstDeclarationNameInfo(), clang::transformOMPMappableExprListClause(), clang::RecursiveASTVisitor< CallGraph >::TraverseDeclarationNameInfo(), and clang::ASTNodeImporter::VisitMemberExpr().
|
inline |
getNamedTypeInfo - Returns the source type info associated to the name.
Assumes it is a constructor, destructor or conversion.
Definition at line 806 of file DeclarationName.h.
Referenced by clang::Sema::DiagnoseUnexpandedParameterPack(), clang::ASTNodeImporter::ImportDeclarationNameLoc(), and clang::RecursiveASTVisitor< CallGraph >::TraverseDeclarationNameInfo().
|
inline |
getSourceRange - The range of the declaration name.
Definition at line 872 of file DeclarationName.h.
Referenced by clang::Sema::ActOnDependentMemberExpr(), 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::TypeConstraint::print().
|
inline |
setCXXLiteralOperatorNameLoc - Sets the location of the literal operator name (not the operator keyword).
Assumes it is a literal operator.
Definition at line 850 of file DeclarationName.h.
Referenced by clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnStringLiteral(), 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 833 of file DeclarationName.h.
Referenced by clang::Sema::CreateOverloadedArraySubscriptExpr(), and clang::ASTNodeImporter::ImportDeclarationNameLoc().
|
inline |
Definition at line 802 of file DeclarationName.h.
Referenced by clang::ASTRecordReader::readDeclarationNameInfo().
|
inline |
setLoc - Sets the main location of the declaration name.
Definition at line 799 of file DeclarationName.h.
Referenced by checkMappableExpressionList(), clang::Sema::LookupInlineAsmVarDeclField(), and clang::ASTRecordReader::readDeclarationNameInfo().
|
inline |
setName - Sets the embedded declaration name.
Definition at line 793 of file DeclarationName.h.
Referenced by clang::TemplateDeclInstantiator::adjustForRewrite(), checkMappableExpressionList(), clang::Sema::LookupInlineAsmVarDeclField(), and clang::ASTRecordReader::readDeclarationNameInfo().
|
inline |
setNamedTypeInfo - Sets the source type info associated to the name.
Assumes it is a constructor, destructor or conversion.
Definition at line 816 of file DeclarationName.h.
Referenced by clang::ASTNodeImporter::ImportDeclarationNameLoc().