clang
3.9.0
|
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnding source/type location info. More...
#include <DeclarationName.h>
Public Member Functions | |
DeclarationNameInfo () | |
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 433 of file DeclarationName.h.
|
inline |
Definition at line 444 of file DeclarationName.h.
|
inline |
Definition at line 446 of file DeclarationName.h.
|
inline |
Definition at line 449 of file DeclarationName.h.
bool DeclarationNameInfo::containsUnexpandedParameterPack | ( | ) | const |
Determine whether this name contains an unexpanded parameter pack.
Definition at line 498 of file DeclarationName.cpp.
References clang::Type::containsUnexpandedParameterPack(), clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, clang::DeclarationName::CXXUsingDirective, clang::DeclarationName::getCXXNameType(), clang::DeclarationName::getNameKind(), clang::DeclarationName::Identifier, clang::DeclarationNameLoc::NamedType, clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, clang::DeclarationName::ObjCZeroArgSelector, and clang::DeclarationNameLoc::NT::TInfo.
std::string DeclarationNameInfo::getAsString | ( | ) | const |
getAsString - Retrieve the human-readable string for this name.
Definition at line 542 of file DeclarationName.cpp.
References printName(), and clang::Result.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPCriticalDirective().
|
inline |
getBeginLoc - Retrieve the location of the first token.
Definition at line 531 of file DeclarationName.h.
Referenced by clang::Sema::ActOnFriendFunctionDecl(), getLocStart(), 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 504 of file DeclarationName.h.
References clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationNameLoc::CXXLiteralOperatorName, clang::SourceLocation::getFromRawEncoding(), 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 486 of file DeclarationName.h.
References clang::DeclarationNameLoc::CXXOpName::BeginOpNameLoc, clang::DeclarationName::CXXOperatorName, clang::DeclarationNameLoc::CXXOperatorName, clang::DeclarationNameLoc::CXXOpName::EndOpNameLoc, and clang::SourceLocation::getFromRawEncoding().
Referenced by clang::ASTNodeImporter::ImportDeclarationNameLoc(), and RebuildLambdaScopeInfo().
SourceLocation DeclarationNameInfo::getEndLoc | ( | ) | const |
getEndLoc - Retrieve the location of the last token.
Definition at line 580 of file DeclarationName.cpp.
References clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationNameLoc::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, clang::DeclarationNameLoc::CXXOperatorName, clang::DeclarationName::CXXUsingDirective, clang::DeclarationNameLoc::CXXOpName::EndOpNameLoc, clang::SourceLocation::getFromRawEncoding(), clang::DeclarationName::getNameKind(), clang::DeclarationName::Identifier, clang::DeclarationNameLoc::NamedType, clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, clang::DeclarationName::ObjCZeroArgSelector, clang::DeclarationNameLoc::CXXLitOpName::OpNameLoc, and clang::DeclarationNameLoc::NT::TInfo.
Referenced by clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::BuildQualifiedDeclarationNameExpr(), getLocEnd(), clang::MemberExpr::getLocEnd(), and clang::CXXDependentScopeMemberExpr::getLocEnd().
|
inline |
Definition at line 463 of file DeclarationName.h.
Referenced by clang::ASTRecordWriter::AddDeclarationNameInfo(), clang::Sema::BuildLiteralOperatorCall(), and clang::Sema::GetNameFromUnqualifiedId().
|
inline |
Definition at line 464 of file DeclarationName.h.
|
inline |
getLoc - Returns the main location of the declaration name.
Definition at line 459 of file DeclarationName.h.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnIdExpression(), 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::CheckTemplateTypeArgument(), clang::Sema::CheckVarTemplateId(), clang::Sema::CorrectTypo(), clang::Sema::DiagnoseClassNameShadow(), diagnoseInstanceReference(), DiagnoseQualifiedMemberReference(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::DependentScopeDeclRefExpr::getLocation(), clang::CXXDependentScopeMemberExpr::getMemberLoc(), clang::LookupResult::getNameLoc(), clang::OverloadExpr::getNameLoc(), getVarTemplateSpecialization(), recoverFromMSUnqualifiedLookup(), clang::Sema::SubstDeclarationNameInfo(), clang::TreeTransform< Derived >::TransformDeclarationNameInfo(), and clang::ASTNodeImporter::VisitMemberExpr().
|
inline |
Definition at line 541 of file DeclarationName.h.
References getEndLoc(), getLocStart(), and clang::SourceLocation::isValid().
Referenced by clang::Sema::CheckUsingDeclQualifier(), clang::DeclRefExpr::getLocEnd(), clang::UnresolvedLookupExpr::getLocEnd(), clang::UnresolvedMemberExpr::getLocEnd(), and getSourceRange().
|
inline |
Definition at line 538 of file DeclarationName.h.
References getBeginLoc().
Referenced by getLocEnd(), clang::DeclRefExpr::getLocStart(), clang::UnresolvedLookupExpr::getLocStart(), clang::UnresolvedMemberExpr::getLocStart(), clang::FunctionDecl::getReturnTypeSourceRange(), and getSourceRange().
|
inline |
getName - Returns the embedded declaration name.
Definition at line 454 of file DeclarationName.h.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnDependentMemberExpr(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnIdExpression(), clang::Sema::ActOnMemberAccessExpr(), clang::Sema::ActOnOpenMPCriticalDirective(), clang::Sema::ActOnOpenMPDeclareTargetName(), clang::Sema::ActOnOpenMPIdExpression(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnUsingDeclaration(), clang::ASTRecordWriter::AddDeclarationNameInfo(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildPossibleImplicitMemberExpr(), clang::Sema::BuildQualifiedDeclarationNameExpr(), clang::Sema::BuildQualifiedTemplateIdExpr(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckMicrosoftIfExistsSymbol(), CheckNestingOfRegions(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CheckUsingDeclQualifier(), clang::Sema::CorrectTypo(), clang::Sema::CorrectTypoDelayed(), clang::CXXConstructorDecl::Create(), clang::CXXDestructorDecl::Create(), clang::CXXConversionDecl::Create(), CreateNewFunctionDecl(), clang::Sema::DiagnoseClassNameShadow(), diagnoseInstanceReference(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::DependentScopeDeclRefExpr::getDeclName(), clang::LookupResult::getLookupName(), clang::CXXDependentScopeMemberExpr::getMember(), clang::OverloadExpr::getName(), getVarTemplateSpecialization(), handleCleanupAttr(), clang::Sema::HandleDeclarator(), clang::ASTNodeImporter::ImportDeclarationNameLoc(), clang::MemberExpr::MemberExpr(), clang::ASTReader::ReadDeclarationNameInfo(), recoverFromMSUnqualifiedLookup(), clang::Sema::SubstDeclarationNameInfo(), clang::TreeTransform< Derived >::TransformDeclarationNameInfo(), clang::RecursiveASTVisitor< Derived >::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 469 of file DeclarationName.h.
References clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::DeclarationNameLoc::NamedType, and clang::DeclarationNameLoc::NT::TInfo.
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 535 of file DeclarationName.h.
References getLocEnd(), and getLocStart().
Referenced by clang::Sema::ActOnDependentMemberExpr(), clang::Sema::CheckFriendAccess(), clang::Sema::CheckInheritingConstructorUsingDecl(), getVarTemplateSpecialization(), and clang::TypoCorrection::setCorrectionRange().
bool DeclarationNameInfo::isInstantiationDependent | ( | ) | const |
Determine whether this name involves a template parameter.
Definition at line 520 of file DeclarationName.cpp.
References clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, clang::DeclarationName::CXXUsingDirective, clang::DeclarationName::getCXXNameType(), clang::DeclarationName::getNameKind(), clang::DeclarationName::Identifier, clang::Type::isInstantiationDependentType(), clang::DeclarationNameLoc::NamedType, clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, clang::DeclarationName::ObjCZeroArgSelector, and clang::DeclarationNameLoc::NT::TInfo.
void DeclarationNameInfo::printName | ( | raw_ostream & | OS | ) | const |
printName - Print the human-readable name to a stream.
Definition at line 549 of file DeclarationName.cpp.
References clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationName::CXXOperatorName, clang::DeclarationName::CXXUsingDirective, clang::DeclarationName::getNameKind(), clang::DeclarationName::Identifier, clang::DeclarationNameLoc::NamedType, clang::DeclarationName::ObjCMultiArgSelector, clang::DeclarationName::ObjCOneArgSelector, clang::DeclarationName::ObjCZeroArgSelector, and clang::DeclarationNameLoc::NT::TInfo.
Referenced by getAsString(), and 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 512 of file DeclarationName.h.
References clang::DeclarationName::CXXLiteralOperatorName, clang::DeclarationNameLoc::CXXLiteralOperatorName, clang::SourceLocation::getRawEncoding(), and clang::DeclarationNameLoc::CXXLitOpName::OpNameLoc.
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 495 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(), and clang::SourceLocation::getRawEncoding().
Referenced by clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::CreateOverloadedArraySubscriptExpr(), and clang::ASTNodeImporter::ImportDeclarationNameLoc().
|
inline |
Definition at line 465 of file DeclarationName.h.
Referenced by clang::ASTReader::ReadDeclarationNameInfo().
|
inline |
setLoc - Sets the main location of the declaration name.
Definition at line 461 of file DeclarationName.h.
Referenced by clang::Sema::GetNameFromUnqualifiedId(), clang::Sema::LookupInlineAsmVarDeclField(), and clang::ASTReader::ReadDeclarationNameInfo().
|
inline |
setName - Sets the embedded declaration name.
Definition at line 456 of file DeclarationName.h.
Referenced by clang::Sema::BuildUsingDeclaration(), clang::Sema::GetNameFromUnqualifiedId(), clang::Sema::LookupInlineAsmVarDeclField(), clang::ASTReader::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 477 of file DeclarationName.h.
References clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, clang::DeclarationNameLoc::NamedType, and clang::DeclarationNameLoc::NT::TInfo.
Referenced by clang::Sema::BuildUsingDeclaration(), clang::Sema::GetNameFromUnqualifiedId(), clang::ASTNodeImporter::ImportDeclarationNameLoc(), clang::TreeTransform< Derived >::RebuildCXXPseudoDestructorExpr(), and clang::TreeTransform< Derived >::TransformDeclarationNameInfo().