clang API Documentation
Represents a ValueDecl that came out of a declarator. Contains type source information through TypeSourceInfo. More...
#include <Decl.h>
Classes | |
struct | ExtInfo |
Public Member Functions | |
TypeSourceInfo * | getTypeSourceInfo () const |
void | setTypeSourceInfo (TypeSourceInfo *TI) |
SourceLocation | getInnerLocStart () const |
void | setInnerLocStart (SourceLocation L) |
SourceLocation | getOuterLocStart () const |
SourceRange | getSourceRange () const override LLVM_READONLY |
Source range that this declaration covers. | |
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. | |
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. | |
void | setQualifierInfo (NestedNameSpecifierLoc QualifierLoc) |
unsigned | getNumTemplateParameterLists () const |
TemplateParameterList * | getTemplateParameterList (unsigned index) const |
void | setTemplateParameterListsInfo (ASTContext &Context, unsigned NumTPLists, TemplateParameterList **TPLists) |
SourceLocation | getTypeSpecStartLoc () const |
Static Public Member Functions | |
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) | |
Friends | |
class | ASTDeclReader |
class | ASTDeclWriter |
Represents a ValueDecl that came out of a declarator. Contains type source information through TypeSourceInfo.
clang::DeclaratorDecl::DeclaratorDecl | ( | Kind | DK, |
DeclContext * | DC, | ||
SourceLocation | L, | ||
DeclarationName | N, | ||
QualType | T, | ||
TypeSourceInfo * | TInfo, | ||
SourceLocation | StartL | ||
) | [inline, protected] |
static bool clang::DeclaratorDecl::classof | ( | const Decl * | D | ) | [inline, static] |
Reimplemented from clang::ValueDecl.
Reimplemented in clang::MSPropertyDecl, clang::VarTemplatePartialSpecializationDecl, clang::VarTemplateSpecializationDecl, clang::CXXConversionDecl, clang::CXXDestructorDecl, clang::FieldDecl, clang::CXXConstructorDecl, clang::FunctionDecl, clang::CXXMethodDecl, clang::ObjCAtDefsFieldDecl, clang::ObjCIvarDecl, clang::ParmVarDecl, clang::ImplicitParamDecl, clang::VarDecl, and clang::NonTypeTemplateParmDecl.
Definition at line 625 of file Decl.h.
References clang::Decl::getKind().
static bool clang::DeclaratorDecl::classofKind | ( | Kind | K | ) | [inline, static] |
Reimplemented from clang::ValueDecl.
Reimplemented in clang::VarTemplatePartialSpecializationDecl, clang::VarTemplateSpecializationDecl, clang::CXXConversionDecl, clang::CXXDestructorDecl, clang::FieldDecl, clang::CXXConstructorDecl, clang::FunctionDecl, clang::CXXMethodDecl, clang::ObjCAtDefsFieldDecl, clang::ObjCIvarDecl, clang::ParmVarDecl, clang::ImplicitParamDecl, clang::VarDecl, and clang::NonTypeTemplateParmDecl.
SourceLocation clang::DeclaratorDecl::getInnerLocStart | ( | ) | const [inline] |
getInnerLocStart - Return SourceLocation representing start of source range ignoring outer template declarations.
Definition at line 583 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().
SourceLocation clang::DeclaratorDecl::getLocStart | ( | ) | const [inline] |
Reimplemented from clang::Decl.
Definition at line 591 of file Decl.h.
Referenced by addFunctionPointerConversion(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCXXNew(), clang::Sema::buildLambdaScope(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::ComputeInheritingCtorExceptionSpec(), clang::Sema::ConvertArgumentsForCall(), DiagnoseUninitializedUse(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::ParmVarDecl::getSourceRange(), clang::ASTNodeImporter::VisitVarTemplateDecl(), and clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl().
unsigned clang::DeclaratorDecl::getNumTemplateParameterLists | ( | ) | const [inline] |
Definition at line 612 of file Decl.h.
Referenced by clang::Sema::ActOnFriendFunctionDecl(), clang::comments::DeclInfo::fill(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
getOuterLocStart - Return SourceLocation representing start of source range taking into account any outer template declarations.
Definition at line 1612 of file Decl.cpp.
References getTemplateOrInnerLocStart().
Referenced by clang::Sema::ActOnCXXForRangeDecl(), clang::Sema::BuildCXXDefaultArgExpr(), getSourceRange(), clang::VarDecl::getSourceRange(), clang::NonTypeTemplateParmDecl::getSourceRange(), clang::ParmVarDecl::getSourceRange(), and clang::FunctionDecl::getSourceRange().
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 597 of file Decl.h.
Referenced by clang::Sema::CheckFriendAccess().
NestedNameSpecifierLoc clang::DeclaratorDecl::getQualifierLoc | ( | ) | const [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 605 of file Decl.h.
Referenced by clang::Sema::CheckFriendAccess(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitVarDecl(), clang::ASTNodeImporter::VisitVarTemplateDecl(), and clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl().
SourceRange DeclaratorDecl::getSourceRange | ( | ) | const [override, virtual] |
Source range that this declaration covers.
Reimplemented from clang::Decl.
Reimplemented in clang::FieldDecl, clang::FunctionDecl, clang::ParmVarDecl, clang::NonTypeTemplateParmDecl, and clang::VarDecl.
Definition at line 1656 of file Decl.cpp.
References clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), getOuterLocStart(), and getTypeSourceInfo().
Referenced by clang::Sema::BuildDeclaratorGroup().
TemplateParameterList* clang::DeclaratorDecl::getTemplateParameterList | ( | unsigned | index | ) | const [inline] |
Definition at line 615 of file Decl.h.
Referenced by clang::comments::DeclInfo::fill(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
TypeSourceInfo* clang::DeclaratorDecl::getTypeSourceInfo | ( | ) | const [inline] |
Definition at line 569 of file Decl.h.
Referenced by clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnVarTemplateSpecialization(), addFunctionPointerConversion(), clang::Sema::AddInitializerToDecl(), clang::ASTContext::adjustExceptionSpec(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildDeclaratorGroup(), clang::Sema::buildInitCaptureField(), CheckAbstractClassUsage(), 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(), NeedsInstantiationAsFunctionType(), 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().
Definition at line 1558 of file Decl.cpp.
References clang::TypeLoc::getBeginLoc(), clang::TypeSourceInfo::getTypeLoc(), and getTypeSourceInfo().
Referenced by clang::Sema::ActOnVarTemplateSpecialization(), clang::Sema::CheckMain(), clang::Sema::CompleteVarTemplateSpecializationDecl(), DiagnoseInvalidRedeclaration(), handleGlobalAttr(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::SubstFunctionType(), and clang::Sema::SubstituteExplicitTemplateArguments().
void clang::DeclaratorDecl::setInnerLocStart | ( | SourceLocation | L | ) | [inline] |
Definition at line 584 of file Decl.h.
Referenced by clang::Sema::InstantiateFunctionDefinition(), clang::ASTDeclReader::UpdateDecl(), and clang::ASTDeclReader::VisitDeclaratorDecl().
void DeclaratorDecl::setQualifierInfo | ( | NestedNameSpecifierLoc | QualifierLoc | ) |
Definition at line 1564 of file Decl.cpp.
References clang::ASTContext::Deallocate(), and clang::Decl::getASTContext().
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, |
unsigned | NumTPLists, | ||
TemplateParameterList ** | TPLists | ||
) |
Definition at line 1595 of file Decl.cpp.
References clang::Decl::getASTContext().
Referenced by clang::Sema::ActOnFunctionDeclarator(), and clang::Sema::ActOnVariableDeclarator().
void clang::DeclaratorDecl::setTypeSourceInfo | ( | TypeSourceInfo * | TI | ) | [inline] |
Definition at line 574 of file Decl.h.
Referenced by clang::Sema::CheckVariableDeclarationType(), and clang::Sema::RebuildTemplateParamsInCurrentInstantiation().
friend class ASTDeclReader [friend] |
Reimplemented from clang::Decl.
Reimplemented in clang::MSPropertyDecl, clang::VarTemplatePartialSpecializationDecl, clang::VarTemplateSpecializationDecl, clang::CXXConversionDecl, clang::CXXDestructorDecl, clang::FieldDecl, clang::CXXConstructorDecl, clang::FunctionDecl, clang::NonTypeTemplateParmDecl, and clang::VarDecl.
friend class ASTDeclWriter [friend] |
Reimplemented from clang::Decl.
Reimplemented in clang::VarTemplatePartialSpecializationDecl, clang::VarTemplateSpecializationDecl, clang::CXXConversionDecl, clang::CXXDestructorDecl, clang::FieldDecl, clang::CXXConstructorDecl, and clang::FunctionDecl.