|
clang
5.0.0
|
Provides common interface for the Decls that can be redeclared. More...
#include "clang/AST/Redeclarable.h"
Classes | |
| class | DeclLink |
| class | redecl_iterator |
| Iterates through all the redeclarations of the same decl. More... | |
Public Types | |
| typedef llvm::iterator_range < redecl_iterator > | redecl_range |
Public Member Functions | |
| Redeclarable (const ASTContext &Ctx) | |
| decl_type * | getPreviousDecl () |
| Return the previous declaration of this declaration or NULL if this is the first declaration. More... | |
| const decl_type * | getPreviousDecl () const |
| decl_type * | getFirstDecl () |
| Return the first declaration of this declaration or itself if this is the only declaration. More... | |
| const decl_type * | getFirstDecl () const |
| Return the first declaration of this declaration or itself if this is the only declaration. More... | |
| bool | isFirstDecl () const |
| True if this is the first declaration in its redeclaration chain. More... | |
| decl_type * | getMostRecentDecl () |
| Returns the most recent (re)declaration of this declaration. More... | |
| const decl_type * | getMostRecentDecl () const |
| Returns the most recent (re)declaration of this declaration. More... | |
| void | setPreviousDecl (decl_type *PrevDecl) |
| Set the previous declaration. More... | |
| redecl_range | redecls () const |
| Returns an iterator range for all the redeclarations of the same decl. More... | |
| redecl_iterator | redecls_begin () const |
| redecl_iterator | redecls_end () const |
Protected Member Functions | |
| decl_type * | getNextRedeclaration () const |
Static Protected Member Functions | |
| static DeclLink | PreviousDeclLink (decl_type *D) |
| static DeclLink | LatestDeclLink (const ASTContext &Ctx) |
Protected Attributes | |
| DeclLink | RedeclLink |
| Points to the next redeclaration in the chain. More... | |
| decl_type * | First |
Friends | |
| class | ASTDeclReader |
| class | ASTDeclWriter |
Provides common interface for the Decls that can be redeclared.
Definition at line 80 of file Redeclarable.h.
| typedef llvm::iterator_range<redecl_iterator> clang::Redeclarable< decl_type >::redecl_range |
Definition at line 285 of file Redeclarable.h.
|
inline |
Definition at line 192 of file Redeclarable.h.
|
inline |
Return the first declaration of this declaration or itself if this is the only declaration.
Definition at line 209 of file Redeclarable.h.
Referenced by clang::ASTContext::addCopyConstructorForExceptionObject(), clang::Sema::BuildVarTemplateInstantiation(), clang::Sema::FinalizeDeclaration(), clang::ASTContext::getCopyConstructorForExceptionObject(), clang::ASTContext::getInlineVariableDefinitionKind(), clang::Redeclarable< VarDecl >::getMostRecentDecl(), clang::Sema::InstantiateVariableInitializer(), clang::Sema::isEmptyCudaConstructor(), clang::Sema::isEmptyCudaDestructor(), clang::ASTContext::isMSStaticDataMemberInlineDefinition(), clang::Sema::MarkUnusedFileScopedDecl(), clang::Sema::MaybeSuggestAddingStaticToDecl(), clang::Sema::MergeFunctionDecl(), clang::ASTContext::setNonKeyFunction(), clang::Redeclarable< decl_type >::setPreviousDecl(), clang::ASTDeclWriter::VisitCXXMethodDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTDeclReader::VisitNamespaceDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTDeclWriter::VisitRedeclarable(), clang::ASTDeclWriter::VisitTypedefDecl(), and clang::ASTDeclWriter::VisitVarDecl().
|
inline |
Return the first declaration of this declaration or itself if this is the only declaration.
Definition at line 213 of file Redeclarable.h.
|
inline |
Returns the most recent (re)declaration of this declaration.
Definition at line 219 of file Redeclarable.h.
Referenced by clang::ASTContext::adjustDeducedFunctionResultType(), clang::Sema::InstantiateFunctionDefinition(), clang::Sema::MarkFunctionReferenced(), clang::Sema::MergeCompatibleFunctionDecls(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::MergeVarDecl(), clang::Sema::MergeVarDeclTypes(), clang::Sema::PerformPendingInstantiations(), ShouldRemoveFromUnused(), clang::ASTDeclWriter::VisitTypedefDecl(), and clang::ASTDeclWriter::VisitVarDecl().
|
inline |
Returns the most recent (re)declaration of this declaration.
Definition at line 224 of file Redeclarable.h.
|
inlineprotected |
Definition at line 187 of file Redeclarable.h.
Referenced by clang::Redeclarable< VarDecl >::getPreviousDecl(), and clang::Redeclarable< decl_type >::setPreviousDecl().
|
inline |
Return the previous declaration of this declaration or NULL if this is the first declaration.
Definition at line 197 of file Redeclarable.h.
Referenced by clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::ActOnVarTemplateSpecialization(), clang::ASTContext::adjustDeducedFunctionResultType(), clang::ASTDeclReader::attachPreviousDeclImpl(), clang::Sema::BuildVariableInstantiation(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::DeduceVariableDeclarationType(), clang::FunctionDecl::doesDeclarationForceExternallyVisibleDefinition(), dumpPreviousDeclImpl(), clang::RedeclarableTemplateDecl::getCommonPtr(), getLVForLocalDecl(), getLVForNamespaceScopeDecl(), clang::Redeclarable< VarDecl >::getPreviousDecl(), clang::ADLResult::insert(), clang::FunctionDecl::isMSExternInline(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::MergeVarDeclTypes(), redeclForcesDefMSVC(), clang::Sema::SetDeclDeleted(), ShouldWarnAboutMissingPrototype(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTDeclWriter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRedeclarable(), and clang::ASTDeclWriter::VisitVarTemplatePartialSpecializationDecl().
|
inline |
Definition at line 202 of file Redeclarable.h.
|
inline |
True if this is the first declaration in its redeclaration chain.
Definition at line 216 of file Redeclarable.h.
Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::ASTDeclReader::mergeRedeclarable(), clang::ASTDeclWriter::VisitClassTemplateDecl(), clang::ASTDeclWriter::VisitFunctionTemplateDecl(), clang::ASTDeclWriter::VisitRedeclarableTemplateDecl(), and clang::ASTDeclWriter::VisitVarTemplateDecl().
|
inlinestaticprotected |
Definition at line 169 of file Redeclarable.h.
|
inlinestaticprotected |
Definition at line 165 of file Redeclarable.h.
Referenced by clang::ASTDeclReader::mergeRedeclarable(), and clang::ASTDeclReader::VisitRedeclarable().
|
inline |
Returns an iterator range for all the redeclarations of the same decl.
It will iterate at least once (when this decl is the only one).
Definition at line 289 of file Redeclarable.h.
Referenced by clang::Sema::DefineUsedVTables(), clang::VarDecl::getActingDefinition(), clang::VarDecl::getDefinition(), clang::ASTContext::getInlineVariableDefinitionKind(), getInterestingTagDecl(), hasAnyExplicitStorageClass(), clang::VarDecl::hasDefinition(), clang::Sema::InheritedConstructorInfo::InheritedConstructorInfo(), clang::Sema::isAcceptableTagRedeclaration(), clang::Sema::MarkFunctionReferenced(), clang::Sema::MergeFunctionDecl(), clang::Redeclarable< VarDecl >::redecls_begin(), clang::Redeclarable< VarDecl >::redecls_end(), clang::Sema::UpdateExceptionSpec(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
|
inline |
Definition at line 295 of file Redeclarable.h.
|
inline |
Definition at line 296 of file Redeclarable.h.
Referenced by clang::Sema::MergeFunctionDecl().
| void clang::Redeclarable< decl_type >::setPreviousDecl | ( | decl_type * | PrevDecl | ) |
Set the previous declaration.
If PrevDecl is NULL, set this as the first and only declaration.
Definition at line 3968 of file Decl.h.
References clang::Redeclarable< VarDecl >::First, clang::Redeclarable< decl_type >::getFirstDecl(), clang::Redeclarable< decl_type >::getNextRedeclaration(), clang::Decl::IDNS_Ordinary, clang::Decl::IDNS_Tag, clang::Decl::IDNS_Type, clang::NamedDecl::isLinkageValid(), clang::Redeclarable< VarDecl >::PreviousDeclLink(), clang::Redeclarable< VarDecl >::RedeclLink, and clang::Redeclarable< decl_type >::RedeclLink.
Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnNamespaceAliasDef(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::CheckClassTemplate(), clang::Sema::MergeTypedefNameDecl(), clang::Sema::MergeVarDecl(), and clang::ASTNodeImporter::VisitRecordDecl().
|
friend |
Definition at line 298 of file Redeclarable.h.
|
friend |
Definition at line 299 of file Redeclarable.h.
|
protected |
Definition at line 185 of file Redeclarable.h.
Referenced by clang::ASTDeclReader::attachPreviousDeclImpl(), clang::Redeclarable< VarDecl >::getFirstDecl(), and clang::ASTDeclReader::VisitRedeclarable().
|
protected |
Points to the next redeclaration in the chain.
If NextIsPrevious() is true, this is a link to the previous declaration of this same Decl. If NextIsLatest() is true, this is the first declaration and Link points to the latest declaration. For example:
#1 int f(int x, int y = 1); // <pointer to #3, true> #2 int f(int x = 0, int y); // <pointer to #1, false> #3 int f(int x, int y) { return x + y; } // <pointer to #2, false>
If there is only one declaration, it is <pointer to self, true>
Definition at line 184 of file Redeclarable.h.
Referenced by clang::ASTDeclReader::attachLatestDeclImpl(), clang::ASTDeclReader::attachPreviousDeclImpl(), clang::ASTDeclReader::getMostRecentDeclImpl(), clang::Redeclarable< VarDecl >::getNextRedeclaration(), clang::Redeclarable< VarDecl >::getPreviousDecl(), clang::Redeclarable< VarDecl >::isFirstDecl(), clang::ASTDeclReader::markIncompleteDeclChainImpl(), clang::ASTDeclReader::mergeRedeclarable(), clang::Redeclarable< decl_type >::setPreviousDecl(), and clang::ASTDeclReader::VisitRedeclarable().
1.8.6