clang
3.9.0
|
Represents a ValueDecl that came out of a declarator. More...
#include <Decl.h>
Public Member Functions | |
TypeSourceInfo * | getTypeSourceInfo () const |
void | setTypeSourceInfo (TypeSourceInfo *TI) |
SourceLocation | getInnerLocStart () const |
getInnerLocStart - Return SourceLocation representing start of source range ignoring outer template declarations. More... | |
void | setInnerLocStart (SourceLocation L) |
SourceLocation | getOuterLocStart () const |
getOuterLocStart - Return SourceLocation representing start of source range taking into account any outer template declarations. More... | |
SourceRange | getSourceRange () const override LLVM_READONLY |
SourceLocation | getLocStart () const LLVM_READONLY |
NestedNameSpecifier * | getQualifier () const |
Retrieve the nested-name-specifier that qualifies the name of this declaration, if it was present in the source. More... | |
NestedNameSpecifierLoc | getQualifierLoc () const |
Retrieve the nested-name-specifier (with source-location information) that qualifies the name of this declaration, if it was present in the source. More... | |
void | setQualifierInfo (NestedNameSpecifierLoc QualifierLoc) |
unsigned | getNumTemplateParameterLists () const |
TemplateParameterList * | getTemplateParameterList (unsigned index) const |
void | setTemplateParameterListsInfo (ASTContext &Context, ArrayRef< TemplateParameterList * > TPLists) |
SourceLocation | getTypeSpecStartLoc () const |
![]() | |
QualType | getType () const |
void | setType (QualType newType) |
bool | isWeak () const |
Determine whether this symbol is weakly-imported, or declared with the weak or weak-ref attr. More... | |
![]() | |
IdentifierInfo * | getIdentifier () const |
getIdentifier - Get the identifier that names this declaration, if there is one. More... | |
StringRef | getName () const |
getName - Get the name of identifier for this declaration as a StringRef. More... | |
std::string | getNameAsString () const |
getNameAsString - Get a human-readable name for the declaration, even if it is one of the special kinds of names (C++ constructor, Objective-C selector, etc). More... | |
void | printName (raw_ostream &os) const |
DeclarationName | getDeclName () const |
getDeclName - Get the actual, stored name of the declaration, which may be a special name. More... | |
void | setDeclName (DeclarationName N) |
Set the name of this declaration. More... | |
void | printQualifiedName (raw_ostream &OS) const |
printQualifiedName - Returns human-readable qualified name for declaration, like A::B::i, for i being member of namespace A::B. More... | |
void | printQualifiedName (raw_ostream &OS, const PrintingPolicy &Policy) const |
std::string | getQualifiedNameAsString () const |
virtual void | getNameForDiagnostic (raw_ostream &OS, const PrintingPolicy &Policy, bool Qualified) const |
getNameForDiagnostic - Appends a human-readable name for this declaration into the given stream. More... | |
bool | declarationReplaces (NamedDecl *OldD, bool IsKnownNewer=true) const |
Determine whether this declaration, if known to be well-formed within its context, will replace the declaration OldD if introduced into scope. More... | |
bool | hasLinkage () const |
Determine whether this declaration has linkage. More... | |
bool | isHidden () const |
Determine whether this declaration is hidden from name lookup. More... | |
void | setHidden (bool Hide) |
Set whether this declaration is hidden from name lookup. More... | |
bool | isCXXClassMember () const |
Determine whether this declaration is a C++ class member. More... | |
bool | isCXXInstanceMember () const |
Determine whether the given declaration is an instance member of a C++ class. More... | |
Linkage | getLinkageInternal () const |
Determine what kind of linkage this entity has. More... | |
Linkage | getFormalLinkage () const |
Get the linkage from a semantic point of view. More... | |
bool | hasExternalFormalLinkage () const |
True if this decl has external linkage. More... | |
bool | isExternallyVisible () const |
Visibility | getVisibility () const |
Determines the visibility of this entity. More... | |
LinkageInfo | getLinkageAndVisibility () const |
Determines the linkage and visibility of this entity. More... | |
Optional< Visibility > | getExplicitVisibility (ExplicitVisibilityKind kind) const |
If visibility was explicitly specified for this declaration, return that visibility. More... | |
bool | isLinkageValid () const |
True if the computed linkage is valid. More... | |
bool | hasLinkageBeenComputed () const |
True if something has required us to compute the linkage of this declaration. More... | |
NamedDecl * | getUnderlyingDecl () |
Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl. More... | |
const NamedDecl * | getUnderlyingDecl () const |
NamedDecl * | getMostRecentDecl () |
const NamedDecl * | getMostRecentDecl () const |
ObjCStringFormatFamily | getObjCFStringFormattingFamily () const |
Static Public Member Functions | |
static bool | classof (const Decl *D) |
static bool | classofKind (Kind K) |
![]() | |
static bool | classof (const Decl *D) |
static bool | classofKind (Kind K) |
![]() | |
static bool | classof (const Decl *D) |
static bool | classofKind (Kind K) |
Protected Member Functions | |
DeclaratorDecl (Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N, QualType T, TypeSourceInfo *TInfo, SourceLocation StartL) | |
![]() | |
ValueDecl (Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N, QualType T) | |
![]() | |
NamedDecl (Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N) | |
Friends | |
class | ASTDeclReader |
class | ASTDeclWriter |
Additional Inherited Members | |
![]() | |
enum | ExplicitVisibilityKind { VisibilityForType, VisibilityForValue } |
Kinds of explicit visibility. More... | |
Represents a ValueDecl that came out of a declarator.
Contains type source information through TypeSourceInfo.
|
inlineprotected |
Definition at line 727 of file Decl.h.
References classofKind().
|
inline |
getInnerLocStart - Return SourceLocation representing start of source range ignoring outer template declarations.
Definition at line 685 of file Decl.h.
Referenced by clang::FieldDecl::getSourceRange(), clang::Sema::InstantiateFunctionDefinition(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::TreeTransform< Derived >::RebuildObjCExceptionDecl(), clang::Sema::SubstParmVarDecl(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitDeclaratorDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitNonTypeTemplateParmDecl(), clang::ASTNodeImporter::VisitObjCIvarDecl(), clang::ASTNodeImporter::VisitParmVarDecl(), and clang::ASTNodeImporter::VisitVarDecl().
|
inline |
Definition at line 693 of file Decl.h.
References getOuterLocStart().
Referenced by clang::Sema::ActOnStartCXXMemberReference(), addFunctionPointerConversion(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCXXDefaultArgExpr(), clang::Sema::BuildCXXNew(), clang::Sema::buildLambdaScope(), checkAddressOfFunctionIsAvailable(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), checkOpenCLBlockArgs(), clang::Sema::ConvertArgumentsForCall(), DiagnoseForRangeConstVariableCopies(), DiagnoseForRangeReferenceVariableCopies(), DiagnoseUninitializedUse(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc(), clang::CodeGen::CodeGenFunction::generateDestroyHelper(), clang::TagDecl::getInnerLocStart(), clang::ParmVarDecl::getSourceRange(), handleGlobalAttr(), clang::ASTNodeImporter::VisitVarTemplateDecl(), and clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl().
|
inline |
Definition at line 714 of file Decl.h.
Referenced by clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::AddInitializerToDecl(), clang::Sema::CheckForFunctionRedefinition(), clang::comments::DeclInfo::fill(), getTemplateParameterList(), clang::TagDecl::getTemplateParameterList(), clang::Sema::MergeVarDecl(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
SourceLocation DeclaratorDecl::getOuterLocStart | ( | ) | const |
getOuterLocStart - Return SourceLocation representing start of source range taking into account any outer template declarations.
Definition at line 1695 of file Decl.cpp.
References getTemplateOrInnerLocStart().
Referenced by clang::Sema::ActOnCXXForRangeDecl(), clang::Sema::BuildCXXDefaultArgExpr(), getLocStart(), getSourceRange(), clang::VarDecl::getSourceRange(), clang::NonTypeTemplateParmDecl::getSourceRange(), clang::ParmVarDecl::getSourceRange(), and clang::FunctionDecl::getSourceRange().
|
inline |
Retrieve the nested-name-specifier that qualifies the name of this declaration, if it was present in the source.
Definition at line 699 of file Decl.h.
Referenced by clang::Sema::CheckFriendAccess().
|
inline |
Retrieve the nested-name-specifier (with source-location information) that qualifies the name of this declaration, if it was present in the source.
Definition at line 707 of file Decl.h.
Referenced by clang::Sema::ActOnCallExpr(), clang::Sema::CheckFriendAccess(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitVarDecl(), clang::ASTNodeImporter::VisitVarTemplateDecl(), and clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl().
|
override |
Definition at line 1739 of file Decl.cpp.
References clang::NamedDecl::getDeclName(), getOuterLocStart(), and getTypeSourceInfo().
Referenced by clang::VarDecl::getSourceRange(), clang::NonTypeTemplateParmDecl::getSourceRange(), clang::ParmVarDecl::getSourceRange(), and clang::FieldDecl::getSourceRange().
|
inline |
Definition at line 717 of file Decl.h.
References getNumTemplateParameterLists().
Referenced by clang::comments::DeclInfo::fill(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
|
inline |
Definition at line 671 of file Decl.h.
Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnObjCForCollectionStmt(), addFunctionPointerConversion(), clang::Sema::AddInitializerToDecl(), clang::ASTContext::adjustExceptionSpec(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::buildInitCaptureField(), CheckAbstractClassUsage(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedMemberExceptionSpec(), CheckForModifiableLvalue(), clang::Sema::CheckFunctionDeclaration(), CheckMethodOverrideParam(), CheckNonTypeTemplatePartialSpecializationArgs(), clang::Sema::checkThisInStaticMemberFunctionExceptionSpec(), clang::Sema::checkThisInStaticMemberFunctionType(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CompleteVarTemplateSpecializationDecl(), DiagnoseCalleeStaticArrayParam(), DiagnoseInvalidRedeclaration(), FinishForRangeVarDecl(), FormatFunctionParameter(), clang::ParmVarDecl::getOriginalType(), clang::Sema::getReturnTypeLoc(), clang::FunctionDecl::getReturnTypeSourceRange(), getSourceRange(), getTypeSpecStartLoc(), hasDeducedReturnType(), clang::hasImplicitExceptionSpec(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), IsTailPaddedMemberArray(), clang::Sema::MergeFunctionDecl(), clang::Sema::RebuildTemplateParamsInCurrentInstantiation(), clang::Sema::SubstExceptionSpec(), clang::TemplateDeclInstantiator::SubstFunctionType(), clang::Sema::SubstParmVarDecl(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::ASTNodeImporter::VisitNonTypeTemplateParmDecl(), clang::ASTNodeImporter::VisitObjCIvarDecl(), clang::ASTNodeImporter::VisitParmVarDecl(), clang::ASTNodeImporter::VisitVarDecl(), clang::ASTNodeImporter::VisitVarTemplateDecl(), and clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl().
SourceLocation DeclaratorDecl::getTypeSpecStartLoc | ( | ) | const |
Definition at line 1643 of file Decl.cpp.
References clang::TypeLoc::getBeginLoc(), clang::TypeSourceInfo::getTypeLoc(), and getTypeSourceInfo().
Referenced by clang::Sema::ActOnCXXTryBlock(), clang::Sema::CheckMain(), clang::Sema::CompleteVarTemplateSpecializationDecl(), DiagnoseInvalidRedeclaration(), handleGlobalAttr(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::SubstFunctionType(), and clang::Sema::SubstituteExplicitTemplateArguments().
|
inline |
Definition at line 686 of file Decl.h.
Referenced by clang::Sema::InstantiateFunctionDefinition(), clang::ASTDeclReader::UpdateDecl(), and clang::ASTDeclReader::VisitDeclaratorDecl().
void DeclaratorDecl::setQualifierInfo | ( | NestedNameSpecifierLoc | QualifierLoc | ) |
Definition at line 1649 of file Decl.cpp.
References clang::CodeGen::ExtInfo.
Referenced by clang::Sema::DeclClonePragmaWeak(), SetNestedNameSpecifier(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitVarDecl(), clang::ASTNodeImporter::VisitVarTemplateDecl(), and clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl().
void DeclaratorDecl::setTemplateParameterListsInfo | ( | ASTContext & | Context, |
ArrayRef< TemplateParameterList * > | TPLists | ||
) |
Definition at line 1679 of file Decl.cpp.
References clang::CodeGen::ExtInfo.
Referenced by clang::Sema::ActOnFunctionDeclarator(), and clang::Sema::ActOnVariableDeclarator().
|
inline |
Definition at line 676 of file Decl.h.
Referenced by clang::Sema::CheckVariableDeclarationType(), and clang::Sema::RebuildTemplateParamsInCurrentInstantiation().
|
friend |
|
friend |