clang
10.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 |
DeclarationNameLoc & | getInfo () |
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 690 of file DeclarationName.h.
|
default |
|
inline |
Definition at line 705 of file DeclarationName.h.
|
inline |
Definition at line 708 of file DeclarationName.h.
bool DeclarationNameInfo::containsUnexpandedParameterPack | ( | ) | const |
Determine whether this name contains an unexpanded parameter pack.
Definition at line 402 of file DeclarationName.cpp.
Referenced by clang::CXXUnresolvedConstructExpr::getBeginLoc(), and clang::OverloadExpr::OverloadExpr().
std::string DeclarationNameInfo::getAsString | ( | ) | const |
getAsString - Retrieve the human-readable string for this name.
Definition at line 448 of file DeclarationName.cpp.
References clang::Result.
Referenced by buildUserDefinedMapperRef(), and SemaOpenCLBuiltinToAddr().
|
inline |
getBeginLoc - Retrieve the location of the first token.
Definition at line 798 of file DeclarationName.h.
Referenced by clang::ConceptSpecializationExpr::getBeginLoc(), clang::DeclRefExpr::getBeginLoc(), clang::CXXDependentScopeMemberExpr::getBeginLoc(), clang::FunctionDecl::getReturnTypeSourceRange(), and clang::Sema::getVarTemplateSpecialization().
|
inline |
getCXXLiteralOperatorNameLoc - Returns the location of the literal operator name (not the operator keyword).
Assumes it is a literal operator.
Definition at line 769 of file DeclarationName.h.
References clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationNameLoc::CXXLiteralOperatorName, clang::SourceLocation::getFromRawEncoding(), clang::DeclarationName::getNameKind(), and clang::DeclarationNameLoc::CXXLitOpName::OpNameLoc.
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 749 of file DeclarationName.h.
References clang::DeclarationNameLoc::CXXOpName::BeginOpNameLoc, clang::DeclarationName::CXXOperatorName, clang::DeclarationNameLoc::CXXOperatorName, clang::DeclarationNameLoc::CXXOpName::EndOpNameLoc, clang::SourceLocation::getFromRawEncoding(), and clang::DeclarationName::getNameKind().
Referenced by clang::ASTNodeImporter::ImportDeclarationNameLoc().
|
inline |
Definition at line 805 of file DeclarationName.h.
References clang::SourceLocation::isValid().
Referenced by clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::CheckUsingDeclQualifier(), clang::DeclRefExpr::getEndLoc(), and clang::CXXDependentScopeMemberExpr::getEndLoc().
|
inline |
Definition at line 724 of file DeclarationName.h.
Referenced by clang::ASTRecordWriter::AddDeclarationNameInfo(), clang::Sema::BuildLiteralOperatorCall(), and clang::DeclRefExpr::DeclRefExpr().
|
inline |
Definition at line 725 of file DeclarationName.h.
|
inline |
getLoc - Returns the main location of the declaration name.
Definition at line 719 of file DeclarationName.h.
Referenced by clang::Sema::ActOnOpenMPIdExpression(), clang::ASTRecordWriter::AddDeclarationNameInfo(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildDeclRefExpr(), clang::Sema::BuildLiteralOperatorCall(), clang::Sema::BuildMemberReferenceExpr(), BuildMSPropertyRefExpr(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildQualifiedTemplateIdExpr(), buildUserDefinedMapperRef(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckVarTemplateId(), clang::DeclRefExpr::DeclRefExpr(), diagnoseInstanceReference(), DiagnoseQualifiedMemberReference(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::DependentScopeDeclRefExpr::getLocation(), clang::CXXDependentScopeMemberExpr::getMemberLoc(), clang::LookupResult::getNameLoc(), clang::OverloadExpr::getNameLoc(), clang::Sema::getVarTemplateSpecialization(), clang::Sema::lookupOpenMPDeclareTargetName(), clang::Sema::SubstDeclarationNameInfo(), clang::ASTNodeImporter::VisitDependentScopeDeclRefExpr(), and clang::ASTNodeImporter::VisitMemberExpr().
|
inline |
getName - Returns the embedded declaration name.
Definition at line 713 of file DeclarationName.h.
Referenced by clang::Sema::ActOnDependentMemberExpr(), clang::Sema::ActOnFriendFunctionDecl(), actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPCriticalDirective(), clang::Sema::ActOnOpenMPIdExpression(), clang::ASTRecordWriter::AddDeclarationNameInfo(), argumentDependentLookup(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildQualifiedTemplateIdExpr(), checkMappableExpressionList(), clang::Sema::CheckMicrosoftIfExistsSymbol(), checkNestingOfRegions(), 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::Sema::lookupOpenMPDeclareTargetName(), clang::ASTRecordReader::readDeclarationNameInfo(), clang::Sema::SubstDeclarationNameInfo(), clang::TreeTransform< Derived >::TransformDependentScopeDeclRefExpr(), clang::TreeTransform< Derived >::TransformOMPExecutableDirective(), 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 730 of file DeclarationName.h.
References clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::getNameKind(), clang::DeclarationNameLoc::NamedType, and clang::DeclarationNameLoc::NT::TInfo.
Referenced by clang::Sema::DiagnoseUnexpandedParameterPack(), clang::ASTNodeImporter::ImportDeclarationNameLoc(), and clang::RecursiveASTVisitor< CallGraph >::TraverseDeclarationNameInfo().
|
inline |
getSourceRange - The range of the declaration name.
Definition at line 801 of file DeclarationName.h.
Referenced by clang::Sema::ActOnDependentMemberExpr(), clang::Sema::CheckInheritingConstructorUsingDecl(), and clang::TypoCorrection::setCorrectionRange().
bool DeclarationNameInfo::isInstantiationDependent | ( | ) | const |
Determine whether this name involves a template parameter.
Definition at line 425 of file DeclarationName.cpp.
Referenced by clang::OverloadExpr::OverloadExpr().
void DeclarationNameInfo::printName | ( | raw_ostream & | OS, |
PrintingPolicy | Policy | ||
) | const |
printName - Print the human-readable name to a stream.
Definition at line 461 of file DeclarationName.cpp.
Referenced by clang::operator<<(), and printExplicitSpecifier().
|
inline |
setCXXLiteralOperatorNameLoc - Sets the location of the literal operator name (not the operator keyword).
Assumes it is a literal operator.
Definition at line 779 of file DeclarationName.h.
References clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationNameLoc::CXXLiteralOperatorName, clang::getAsString(), clang::DeclarationName::getNameKind(), clang::SourceLocation::getRawEncoding(), and clang::DeclarationNameLoc::CXXLitOpName::OpNameLoc.
Referenced by BuildCookedLiteralOperatorCall(), 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 760 of file DeclarationName.h.
References clang::DeclarationNameLoc::CXXOpName::BeginOpNameLoc, clang::DeclarationName::CXXOperatorName, clang::DeclarationNameLoc::CXXOperatorName, clang::DeclarationNameLoc::CXXOpName::EndOpNameLoc, clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::DeclarationName::getNameKind(), and clang::SourceLocation::getRawEncoding().
Referenced by clang::ASTNodeImporter::ImportDeclarationNameLoc().
|
inline |
Definition at line 726 of file DeclarationName.h.
Referenced by clang::ASTRecordReader::readDeclarationNameInfo().
|
inline |
setLoc - Sets the main location of the declaration name.
Definition at line 722 of file DeclarationName.h.
Referenced by clang::Sema::LookupInlineAsmVarDeclField(), and clang::ASTRecordReader::readDeclarationNameInfo().
|
inline |
setName - Sets the embedded declaration name.
Definition at line 716 of file DeclarationName.h.
Referenced by clang::TemplateDeclInstantiator::adjustForRewrite(), clang::Sema::BuildUsingDeclaration(), 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 740 of file DeclarationName.h.
References clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::getNameKind(), clang::DeclarationNameLoc::NamedType, and clang::DeclarationNameLoc::NT::TInfo.
Referenced by clang::ASTNodeImporter::ImportDeclarationNameLoc().