clang  3.9.0
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
clang::DeclaratorDecl Class Reference

Represents a ValueDecl that came out of a declarator. More...

#include <Decl.h>

Inheritance diagram for clang::DeclaratorDecl:
[legend]
Collaboration diagram for clang::DeclaratorDecl:
[legend]

Public Member Functions

TypeSourceInfogetTypeSourceInfo () 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
 
NestedNameSpecifiergetQualifier () 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
 
TemplateParameterListgetTemplateParameterList (unsigned index) const
 
void setTemplateParameterListsInfo (ASTContext &Context, ArrayRef< TemplateParameterList * > TPLists)
 
SourceLocation getTypeSpecStartLoc () const
 
- Public Member Functions inherited from clang::ValueDecl
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...
 
- Public Member Functions inherited from clang::NamedDecl
IdentifierInfogetIdentifier () 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< VisibilitygetExplicitVisibility (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...
 
NamedDeclgetUnderlyingDecl ()
 Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl. More...
 
const NamedDeclgetUnderlyingDecl () const
 
NamedDeclgetMostRecentDecl ()
 
const NamedDeclgetMostRecentDecl () const
 
ObjCStringFormatFamily getObjCFStringFormattingFamily () const
 

Static Public Member Functions

static bool classof (const Decl *D)
 
static bool classofKind (Kind K)
 
- Static Public Member Functions inherited from clang::ValueDecl
static bool classof (const Decl *D)
 
static bool classofKind (Kind K)
 
- Static Public Member Functions inherited from clang::NamedDecl
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)
 
- Protected Member Functions inherited from clang::ValueDecl
 ValueDecl (Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N, QualType T)
 
- Protected Member Functions inherited from clang::NamedDecl
 NamedDecl (Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N)
 

Friends

class ASTDeclReader
 
class ASTDeclWriter
 

Additional Inherited Members

- Public Types inherited from clang::NamedDecl
enum  ExplicitVisibilityKind { VisibilityForType, VisibilityForValue }
 Kinds of explicit visibility. More...
 

Detailed Description

Represents a ValueDecl that came out of a declarator.

Contains type source information through TypeSourceInfo.

Definition at line 646 of file Decl.h.

Constructor & Destructor Documentation

clang::DeclaratorDecl::DeclaratorDecl ( Kind  DK,
DeclContext DC,
SourceLocation  L,
DeclarationName  N,
QualType  T,
TypeSourceInfo TInfo,
SourceLocation  StartL 
)
inlineprotected

Definition at line 664 of file Decl.h.

Member Function Documentation

static bool clang::DeclaratorDecl::classof ( const Decl D)
inlinestatic

Definition at line 727 of file Decl.h.

References classofKind().

static bool clang::DeclaratorDecl::classofKind ( Kind  K)
inlinestatic

Definition at line 728 of file Decl.h.

Referenced by classof().

SourceLocation clang::DeclaratorDecl::getInnerLocStart ( ) const
inline
SourceLocation clang::DeclaratorDecl::getLocStart ( ) const
inline
unsigned clang::DeclaratorDecl::getNumTemplateParameterLists ( ) const
inline
SourceLocation DeclaratorDecl::getOuterLocStart ( ) const
NestedNameSpecifier* clang::DeclaratorDecl::getQualifier ( ) const
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().

NestedNameSpecifierLoc clang::DeclaratorDecl::getQualifierLoc ( ) const
inline
SourceRange DeclaratorDecl::getSourceRange ( ) const
override
TemplateParameterList* clang::DeclaratorDecl::getTemplateParameterList ( unsigned  index) const
inline
TypeSourceInfo* clang::DeclaratorDecl::getTypeSourceInfo ( ) const
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
void clang::DeclaratorDecl::setInnerLocStart ( SourceLocation  L)
inline
void DeclaratorDecl::setQualifierInfo ( NestedNameSpecifierLoc  QualifierLoc)
void DeclaratorDecl::setTemplateParameterListsInfo ( ASTContext Context,
ArrayRef< TemplateParameterList * >  TPLists 
)
void clang::DeclaratorDecl::setTypeSourceInfo ( TypeSourceInfo TI)
inline

Friends And Related Function Documentation

friend class ASTDeclReader
friend

Definition at line 732 of file Decl.h.

friend class ASTDeclWriter
friend

Definition at line 733 of file Decl.h.


The documentation for this class was generated from the following files: