clang
6.0.0
|
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) const |
printName - Print the human-readable name to a stream. More... | |
SourceLocation | getBeginLoc () const |
getBeginLoc - Retrieve the location of the first token. More... | |
SourceLocation | getEndLoc () const |
getEndLoc - Retrieve the location of the last token. More... | |
SourceRange | getSourceRange () const LLVM_READONLY |
getSourceRange - The range of the declaration name. More... | |
SourceLocation | getLocStart () const LLVM_READONLY |
SourceLocation | getLocEnd () const LLVM_READONLY |
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnding source/type location info.
Definition at line 453 of file DeclarationName.h.
|
default |
|
inline |
Definition at line 468 of file DeclarationName.h.
|
inline |
Definition at line 471 of file DeclarationName.h.
bool DeclarationNameInfo::containsUnexpandedParameterPack | ( | ) | const |
Determine whether this name contains an unexpanded parameter pack.
Definition at line 605 of file DeclarationName.cpp.
Referenced by clang::CXXUnresolvedConstructExpr::getLocStart(), and clang::OverloadExpr::getNamingClass().
std::string DeclarationNameInfo::getAsString | ( | ) | const |
getAsString - Retrieve the human-readable string for this name.
Definition at line 651 of file DeclarationName.cpp.
References clang::Result.
|
inline |
getBeginLoc - Retrieve the location of the first token.
Definition at line 558 of file DeclarationName.h.
Referenced by clang::CXXDependentScopeMemberExpr::getLocStart(), and getVarTemplateSpecialization().
|
inline |
getCXXLiteralOperatorNameLoc - Returns the location of the literal operator name (not the operator keyword).
Assumes it is a literal operator.
Definition at line 530 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 511 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().
SourceLocation DeclarationNameInfo::getEndLoc | ( | ) | const |
getEndLoc - Retrieve the location of the last token.
Definition at line 692 of file DeclarationName.cpp.
Referenced by clang::Sema::BuildQualifiedDeclarationNameExpr(), and clang::CXXDependentScopeMemberExpr::getLocEnd().
|
inline |
Definition at line 487 of file DeclarationName.h.
Referenced by clang::ASTRecordWriter::AddDeclarationNameInfo(), clang::Sema::BuildLiteralOperatorCall(), and computeDeclRefDependence().
|
inline |
Definition at line 488 of file DeclarationName.h.
|
inline |
getLoc - Returns the main location of the declaration name.
Definition at line 482 of file DeclarationName.h.
Referenced by clang::Sema::ActOnOpenMPDeclareTargetName(), 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(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckVarTemplateId(), computeDeclRefDependence(), diagnoseInstanceReference(), DiagnoseQualifiedMemberReference(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::DependentScopeDeclRefExpr::getLocation(), clang::CXXDependentScopeMemberExpr::getMemberLoc(), clang::LookupResult::getNameLoc(), clang::OverloadExpr::getNameLoc(), getVarTemplateSpecialization(), and clang::Sema::SubstDeclarationNameInfo().
|
inline |
Definition at line 572 of file DeclarationName.h.
References clang::SourceLocation::isValid().
Referenced by clang::Sema::CheckUsingDeclQualifier().
|
inline |
Definition at line 568 of file DeclarationName.h.
|
inline |
getName - Returns the embedded declaration name.
Definition at line 476 of file DeclarationName.h.
Referenced by clang::Sema::ActOnDependentMemberExpr(), ActOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPCriticalDirective(), clang::Sema::ActOnOpenMPDeclareTargetName(), clang::Sema::ActOnOpenMPIdExpression(), clang::ASTRecordWriter::AddDeclarationNameInfo(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildQualifiedTemplateIdExpr(), 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(), getVarTemplateSpecialization(), clang::ASTNodeImporter::ImportDeclarationNameLoc(), clang::MemberExpr::MemberExpr(), clang::ASTReader::ReadDeclarationNameInfo(), clang::Sema::SubstDeclarationNameInfo(), clang::TreeTransform< Derived >::TransformDependentScopeDeclRefExpr(), clang::TreeTransform< Derived >::TransformOverloadExprDecls(), and clang::RecursiveASTVisitor< CallGraph >::TraverseDeclarationNameInfo().
|
inline |
getNamedTypeInfo - Returns the source type info associated to the name.
Assumes it is a constructor, destructor or conversion.
Definition at line 493 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 564 of file DeclarationName.h.
Referenced by clang::Sema::ActOnDependentMemberExpr(), clang::Sema::CheckInheritingConstructorUsingDecl(), getVarTemplateSpecialization(), and clang::TypoCorrection::setCorrectionRange().
bool DeclarationNameInfo::isInstantiationDependent | ( | ) | const |
Determine whether this name involves a template parameter.
Definition at line 628 of file DeclarationName.cpp.
Referenced by clang::OverloadExpr::getNamingClass().
void DeclarationNameInfo::printName | ( | raw_ostream & | OS | ) | const |
printName - Print the human-readable name to a stream.
Definition at line 658 of file DeclarationName.cpp.
Referenced by clang::operator<<().
|
inline |
setCXXLiteralOperatorNameLoc - Sets the location of the literal operator name (not the operator keyword).
Assumes it is a literal operator.
Definition at line 539 of file DeclarationName.h.
References clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationNameLoc::CXXLiteralOperatorName, clang::DeclarationName::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 521 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 489 of file DeclarationName.h.
Referenced by clang::ASTReader::ReadDeclarationNameInfo().
|
inline |
setLoc - Sets the main location of the declaration name.
Definition at line 485 of file DeclarationName.h.
Referenced by clang::ASTReader::ReadDeclarationNameInfo().
|
inline |
setName - Sets the embedded declaration name.
Definition at line 479 of file DeclarationName.h.
Referenced by clang::Sema::BuildUsingDeclaration(), and clang::ASTReader::ReadDeclarationNameInfo().
|
inline |
setNamedTypeInfo - Sets the source type info associated to the name.
Assumes it is a constructor, destructor or conversion.
Definition at line 502 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().