clang API Documentation
#include <DeclBase.h>


Classes | |
| class | ddiag_iterator |
| class | decl_iterator |
| class | filtered_decl_iterator |
| Iterates over a filtered subrange of declarations stored in a DeclContext. More... | |
| class | specific_decl_iterator |
Public Types | |
| typedef NamedDecl ** | lookup_iterator |
| typedef NamedDecl *const * | lookup_const_iterator |
| typedef DeclContextLookupResult | lookup_result |
| typedef DeclContextLookupConstResult | lookup_const_result |
| typedef UsingDirectiveDecl *const * | udir_iterator |
| typedef std::pair < udir_iterator, udir_iterator > | udir_iterator_range |
Public Member Functions | |
| ~DeclContext () | |
| Decl::Kind | getDeclKind () const |
| const char * | getDeclKindName () const |
| DeclContext * | getParent () |
| getParent - Returns the containing DeclContext. | |
| const DeclContext * | getParent () const |
| DeclContext * | getLexicalParent () |
| const DeclContext * | getLexicalParent () const |
| DeclContext * | getLookupParent () |
| Find the parent context of this context that will be used for unqualified name lookup. | |
| const DeclContext * | getLookupParent () const |
| ASTContext & | getParentASTContext () const |
| bool | isClosure () const |
| bool | isObjCContainer () const |
| bool | isFunctionOrMethod () const |
| bool | isFileContext () const |
| bool | isTranslationUnit () const |
| bool | isRecord () const |
| bool | isNamespace () const |
| bool | isInlineNamespace () const |
| bool | isDependentContext () const |
| Determines whether this context is dependent on a template parameter. | |
| bool | isTransparentContext () const |
| bool | isExternCContext () const |
| Determines whether this context is, or is nested within, a C++ extern "C" linkage spec. | |
| bool | Equals (const DeclContext *DC) const |
| Determine whether this declaration context is equivalent to the declaration context DC. | |
| bool | Encloses (const DeclContext *DC) const |
| Determine whether this declaration context encloses the declaration context DC. | |
| DeclContext * | getNonClosureAncestor () |
| Find the nearest non-closure ancestor of this context, i.e. the innermost semantic parent of this context which is not a closure. A context may be its own non-closure ancestor. | |
| const DeclContext * | getNonClosureAncestor () const |
| DeclContext * | getPrimaryContext () |
| const DeclContext * | getPrimaryContext () const |
| DeclContext * | getRedeclContext () |
| const DeclContext * | getRedeclContext () const |
| DeclContext * | getEnclosingNamespaceContext () |
| Retrieve the nearest enclosing namespace context. | |
| const DeclContext * | getEnclosingNamespaceContext () const |
| bool | InEnclosingNamespaceSetOf (const DeclContext *NS) const |
| Test if this context is part of the enclosing namespace set of the context NS, as defined in C++0x [namespace.def]p9. If either context isn't a namespace, this is equivalent to Equals(). | |
| void | collectAllContexts (llvm::SmallVectorImpl< DeclContext * > &Contexts) |
| decl_iterator | decls_begin () const |
| decl_iterator | decls_end () const |
| bool | decls_empty () const |
| decl_iterator | noload_decls_begin () const |
| decl_iterator | noload_decls_end () const |
| void | addDecl (Decl *D) |
| Add the declaration D into this context. | |
| void | addDeclInternal (Decl *D) |
| Add the declaration D into this context, but suppress searches for external declarations with the same name. | |
| void | addHiddenDecl (Decl *D) |
| Add the declaration D to this context without modifying any lookup tables. | |
| void | removeDecl (Decl *D) |
| Removes a declaration from this context. | |
| lookup_result | lookup (DeclarationName Name) |
| lookup_const_result | lookup (DeclarationName Name) const |
| void | localUncachedLookup (DeclarationName Name, llvm::SmallVectorImpl< NamedDecl * > &Results) |
| A simplistic name lookup mechanism that performs name lookup into this declaration context without consulting the external source. | |
| void | makeDeclVisibleInContext (NamedDecl *D, bool Recoverable=true) |
| Makes a declaration visible within this context. | |
| udir_iterator_range | getUsingDirectives () const |
| udir_iterator | using_directives_begin () const |
| udir_iterator | using_directives_end () const |
| ddiag_iterator | ddiag_begin () const |
| ddiag_iterator | ddiag_end () const |
| StoredDeclsMap * | getLookupPtr () const |
| Retrieve the internal representation of the lookup structure. | |
| bool | hasExternalLexicalStorage () const |
| Whether this DeclContext has external storage containing additional declarations that are lexically in this context. | |
| void | setHasExternalLexicalStorage (bool ES=true) |
| State whether this DeclContext has external storage for declarations lexically in this context. | |
| bool | hasExternalVisibleStorage () const |
| Whether this DeclContext has external storage containing additional declarations that are visible in this context. | |
| void | setHasExternalVisibleStorage (bool ES=true) |
| State whether this DeclContext has external storage for declarations visible in this context. | |
| bool | isDeclInLexicalTraversal (const Decl *D) const |
| Determine whether the given declaration is stored in the list of declarations lexically within this context. | |
| void | dumpDeclContext () const |
Static Public Member Functions | |
| static bool | classof (const Decl *D) |
| static bool | classof (const DeclContext *D) |
Protected Member Functions | |
| DeclContext (Decl::Kind K) | |
Static Protected Member Functions | |
| static std::pair< Decl *, Decl * > | BuildDeclChain (const SmallVectorImpl< Decl * > &Decls, bool FieldsAlreadyLoaded) |
| Build up a chain of declarations. | |
Protected Attributes | |
| Decl * | FirstDecl |
| Decl * | LastDecl |
Friends | |
| class | ExternalASTSource |
| class | DependentDiagnostic |
DeclContext - This is used only as base class of specific decl types that can act as declaration contexts. These decls are (only the top classes that directly derive from DeclContext are mentioned, not their subclasses):
TranslationUnitDecl NamespaceDecl FunctionDecl TagDecl ObjCMethodDecl ObjCContainerDecl LinkageSpecDecl BlockDecl
Definition at line 923 of file DeclBase.h.
| typedef NamedDecl* const* clang::DeclContext::lookup_const_iterator |
lookup_const_iterator - An iterator that provides non-mutable access to the results of lookup up a name within this context.
Definition at line 1386 of file DeclBase.h.
Definition at line 1389 of file DeclBase.h.
| typedef NamedDecl** clang::DeclContext::lookup_iterator |
lookup_iterator - An iterator that provides access to the results of looking up a name within this context.
Definition at line 1382 of file DeclBase.h.
Definition at line 1388 of file DeclBase.h.
| typedef UsingDirectiveDecl* const* clang::DeclContext::udir_iterator |
udir_iterator - Iterates through the using-directives stored within this context.
Definition at line 1430 of file DeclBase.h.
| typedef std::pair<udir_iterator, udir_iterator> clang::DeclContext::udir_iterator_range |
Definition at line 1432 of file DeclBase.h.
| clang::DeclContext::DeclContext | ( | Decl::Kind | K | ) | [inline, protected] |
Definition at line 961 of file DeclBase.h.
| DeclContext::~DeclContext | ( | ) |
Definition at line 705 of file DeclBase.cpp.
| void DeclContext::addDecl | ( | Decl * | D | ) |
Add the declaration D into this context.
This routine should be invoked when the declaration D has first been declared, to place D into the context where it was (lexically) defined. Every declaration must be added to one (and only one!) context, where it can be visited via [decls_begin(), decls_end()). Once a declaration has been added to its lexical context, the corresponding DeclContext owns the declaration.
If D is also a NamedDecl, it will be made visible within its semantic context via makeDeclVisibleInContext.
Definition at line 1060 of file DeclBase.cpp.
References addHiddenDecl().
Referenced by clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnFileScopeAsmDecl(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFriendTypeDecl(), clang::Sema::ActOnModuleImport(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnStartCategoryImplementation(), clang::Sema::ActOnStartCategoryInterface(), clang::Sema::ActOnStartLinkageSpecification(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnStaticAssertDeclaration(), clang::Sema::ActOnTemplatedFriendTag(), clang::ObjCImplDecl::addClassMethod(), clang::ObjCImplDecl::addInstanceMethod(), clang::ObjCImplDecl::addPropertyImplementation(), clang::Sema::BuildAnonymousStructOrUnion(), clang::ASTContext::BuildByRefType(), clang::Sema::BuildUsingDeclaration(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::CreatePropertyDecl(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitDestructor(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::DeclareInheritedConstructors(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), clang::ASTContext::getBlockDescriptorExtendedType(), clang::ASTContext::getBlockDescriptorType(), clang::ASTContext::getCFConstantStringType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), clang::Sema::HandleField(), clang::CompilerInstance::loadModule(), clang::Sema::ProcessPropertyDecl(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitCXXRecordDecl(), clang::TemplateDeclInstantiator::VisitEnumDecl(), clang::TemplateDeclInstantiator::VisitFieldDecl(), clang::TemplateDeclInstantiator::VisitFriendDecl(), clang::TemplateDeclInstantiator::VisitFunctionTemplateDecl(), clang::TemplateDeclInstantiator::VisitIndirectFieldDecl(), clang::TemplateDeclInstantiator::VisitLabelDecl(), clang::TemplateDeclInstantiator::VisitNamespaceAliasDecl(), clang::TemplateDeclInstantiator::VisitTypeAliasDecl(), clang::TemplateDeclInstantiator::VisitTypeAliasTemplateDecl(), clang::TemplateDeclInstantiator::VisitTypedefDecl(), clang::TemplateDeclInstantiator::VisitUsingDecl(), clang::TemplateDeclInstantiator::VisitUsingDirectiveDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().
| void DeclContext::addDeclInternal | ( | Decl * | D | ) |
Add the declaration D into this context, but suppress searches for external declarations with the same name.
Although analogous in function to addDecl, this removes an important check. This is only useful if the Decl is being added in response to an external search; in all other cases, addDecl() is the right function to use. See the ASTImporter for use cases.
Definition at line 1067 of file DeclBase.cpp.
References addHiddenDecl().
Referenced by clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::ASTNodeImporter::VisitIndirectFieldDecl(), clang::ASTNodeImporter::VisitNamespaceDecl(), clang::ASTNodeImporter::VisitObjCCategoryDecl(), clang::ASTNodeImporter::VisitObjCCategoryImplDecl(), clang::ASTNodeImporter::VisitObjCInterfaceDecl(), clang::ASTNodeImporter::VisitObjCIvarDecl(), clang::ASTNodeImporter::VisitObjCMethodDecl(), clang::ASTNodeImporter::VisitObjCPropertyDecl(), clang::ASTNodeImporter::VisitObjCPropertyImplDecl(), clang::ASTNodeImporter::VisitObjCProtocolDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::ASTNodeImporter::VisitTypedefNameDecl(), and clang::ASTNodeImporter::VisitVarDecl().
| void DeclContext::addHiddenDecl | ( | Decl * | D | ) |
Add the declaration D to this context without modifying any lookup tables.
This is useful for some operations in dependent contexts where the semantic context might not be dependent; this basically only happens with friends.
Definition at line 1034 of file DeclBase.cpp.
References clang::ASTContext::addedLocalImportDecl(), FirstDecl, clang::Decl::getASTContext(), clang::Decl::getLexicalDeclContext(), clang::Decl::getNextDeclInContext(), clang::Decl::isFromASTFile(), LastDecl, and clang::Decl::NextInContextAndBits.
Referenced by clang::Sema::ActOnAccessSpecifier(), addDecl(), addDeclInternal(), and clang::TemplateDeclInstantiator::VisitAccessSpecDecl().
| std::pair< Decl *, Decl * > DeclContext::BuildDeclChain | ( | const SmallVectorImpl< Decl * > & | Decls, |
| bool | FieldsAlreadyLoaded | ||
| ) | [static, protected] |
Build up a chain of declarations.
Definition at line 862 of file DeclBase.cpp.
References clang::Decl::NextInContextAndBits.
| bool DeclContext::classof | ( | const Decl * | D | ) | [static] |
Reimplemented in clang::BlockDecl, clang::RecordDecl, clang::EnumDecl, clang::TagDecl, clang::LinkageSpecDecl, clang::CXXConversionDecl, clang::CXXDestructorDecl, clang::FunctionDecl, clang::CXXConstructorDecl, clang::ObjCImplementationDecl, clang::ClassTemplatePartialSpecializationDecl, clang::CXXMethodDecl, clang::ObjCCategoryImplDecl, clang::ClassTemplateSpecializationDecl, clang::ObjCImplDecl, clang::CXXRecordDecl, clang::ObjCCategoryDecl, clang::ObjCProtocolDecl, clang::ObjCInterfaceDecl, clang::ObjCContainerDecl, clang::NamespaceDecl, clang::ObjCMethodDecl, and clang::TranslationUnitDecl.
Definition at line 687 of file DeclBase.cpp.
References clang::Decl::getKind().
| static bool clang::DeclContext::classof | ( | const DeclContext * | D | ) | [inline, static] |
Definition at line 1482 of file DeclBase.h.
| void DeclContext::collectAllContexts | ( | llvm::SmallVectorImpl< DeclContext * > & | Contexts | ) |
\brief Collects all of the declaration contexts that are semantically connected to this declaration context.
For declaration contexts that have multiple semantically connected but syntactically distinct contexts, such as C++ namespaces, this routine retrieves the complete set of such declaration contexts in source order. For example, given:
namespace N { int x; } namespace N { int y; }
The Contexts parameter will contain both definitions of N.
| Contexts | Will be cleared and set to the set of declaration contexts that are semanticaly connected to this declaration context, in source order, including this context (which may be the only result, for non-namespace contexts). |
Definition at line 845 of file DeclBase.cpp.
References clang::Redeclarable< decl_type >::getMostRecentDecl(), and clang::Redeclarable< decl_type >::getPreviousDecl().
Referenced by LookupVisibleDecls().
| DeclContext::ddiag_iterator clang::DeclContext::ddiag_begin | ( | ) | const [inline] |
Definition at line 176 of file DependentDiagnostic.h.
References getPrimaryContext(), and isDependentContext().
Referenced by clang::Sema::PerformDependentDiagnostics().
| DeclContext::ddiag_iterator clang::DeclContext::ddiag_end | ( | ) | const [inline] |
Definition at line 186 of file DependentDiagnostic.h.
Referenced by clang::Sema::PerformDependentDiagnostics().
| DeclContext::decl_iterator DeclContext::decls_begin | ( | ) | const |
decls_begin/decls_end - Iterate over the declarations stored in this context.
Definition at line 970 of file DeclBase.cpp.
References FirstDecl, and hasExternalLexicalStorage().
Referenced by clang::Sema::ActOnFields(), AddInterfaceResults(), AddProtocolResults(), clang::CallGraph::addTU(), clang::Sema::BuildAnonymousStructOrUnion(), CheckAbstractClassUsage(), clang::ObjCContainerDecl::classmeth_begin(), cleanupDeallocOrFinalize(), clearLinkageForClass(), clang::Sema::CodeCompleteNamespaceDecl(), clang::Sema::CodeCompleteObjCInterfaceCategory(), clang::CXXRecordDecl::ctor_begin(), DiagnoseAccessPath(), clang::EnumDecl::enumerator_begin(), FindBlocks(), FindEntitiesInDC(), clang::Sema::FindInstantiatedDecl(), GCRewriteFinalize(), clang::LinkageSpecDecl::getLocEnd(), clang::ASTNodeImporter::ImportDeclContext(), InjectAnonymousStructOrUnionMembers(), clang::Sema::InstantiateClass(), clang::Sema::InstantiateClassMembers(), clang::ObjCContainerDecl::instmeth_begin(), clang::ObjCCategoryDecl::ivar_begin(), clang::ObjCImplementationDecl::ivar_begin(), LookupVisibleDecls(), clang::ObjCContainerDecl::meth_begin(), clang::CXXRecordDecl::method_begin(), clang::ObjCContainerDecl::prop_begin(), clang::ObjCImplDecl::propimpl_begin(), Scan(), clang::Sema::SetCtorInitializers(), and clang::idx::ASTVisitor< ImplClass >::VisitDeclContext().
| bool DeclContext::decls_empty | ( | ) | const |
Definition at line 984 of file DeclBase.cpp.
References FirstDecl, and hasExternalLexicalStorage().
Referenced by clang::LinkageSpecDecl::getLocEnd().
| DeclContext::decl_iterator DeclContext::decls_end | ( | ) | const |
Definition at line 977 of file DeclBase.cpp.
References hasExternalLexicalStorage().
Referenced by clang::Sema::ActOnFields(), AddInterfaceResults(), AddProtocolResults(), clang::CallGraph::addTU(), clang::Sema::BuildAnonymousStructOrUnion(), CheckAbstractClassUsage(), clang::ObjCContainerDecl::classmeth_end(), cleanupDeallocOrFinalize(), clearLinkageForClass(), clang::Sema::CodeCompleteNamespaceDecl(), clang::Sema::CodeCompleteObjCInterfaceCategory(), clang::CXXRecordDecl::ctor_end(), DiagnoseAccessPath(), clang::EnumDecl::enumerator_end(), FindBlocks(), FindEntitiesInDC(), clang::Sema::FindInstantiatedDecl(), GCRewriteFinalize(), clang::ASTNodeImporter::ImportDeclContext(), InjectAnonymousStructOrUnionMembers(), clang::Sema::InstantiateClass(), clang::Sema::InstantiateClassMembers(), clang::ObjCContainerDecl::instmeth_end(), clang::ObjCCategoryDecl::ivar_end(), clang::ObjCImplementationDecl::ivar_end(), LookupVisibleDecls(), clang::ObjCContainerDecl::meth_end(), clang::CXXRecordDecl::method_end(), clang::ObjCContainerDecl::prop_end(), clang::ObjCImplDecl::propimpl_end(), Scan(), clang::Sema::SetCtorInitializers(), and clang::idx::ASTVisitor< ImplClass >::VisitDeclContext().
| void DeclContext::dumpDeclContext | ( | ) | const |
Definition at line 165 of file DeclPrinter.cpp.
References getParent(), clang::ASTContext::getPrintingPolicy(), and isTranslationUnit().
| bool DeclContext::Encloses | ( | const DeclContext * | DC | ) | const |
Determine whether this declaration context encloses the declaration context DC.
Definition at line 772 of file DeclBase.cpp.
References Encloses(), getParent(), and getPrimaryContext().
Referenced by clang::Sema::ActOnUsingDirective(), clang::Sema::CheckClassTemplate(), CheckExplicitInstantiationScope(), CheckTemplateSpecializationScope(), Encloses(), findOuterContext(), getRequiredQualification(), clang::Sema::HandleDeclarator(), and clang::Sema::PushOnScopeChains().
| bool clang::DeclContext::Equals | ( | const DeclContext * | DC | ) | const [inline] |
Determine whether this declaration context is equivalent to the declaration context DC.
Definition at line 1079 of file DeclBase.h.
References getPrimaryContext().
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnTag(), clang::Sema::CheckClassTemplate(), CheckTemplateSpecializationScope(), clang::Sema::FindInstantiatedDecl(), findOuterContext(), getCurrentInstantiationOf(), InEnclosingNamespaceSetOf(), clang::IdentifierResolver::isDeclInScope(), isOutOfScopePreviousDeclaration(), isSameEntity(), clang::Sema::LookupName(), LookupVisibleDecls(), MaybeAddOverrideCalls(), and clang::Sema::PushOnScopeChains().
| Decl::Kind clang::DeclContext::getDeclKind | ( | ) | const [inline] |
Definition at line 969 of file DeclBase.h.
Referenced by clang::Decl::castFromDeclContext(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::getObjCContainerKind(), clang::VarDecl::isFunctionOrMethodVarDecl(), and IsUsingDirectiveInToplevelContext().
| const char * DeclContext::getDeclKindName | ( | ) | const |
Definition at line 82 of file DeclBase.cpp.
| DeclContext * DeclContext::getEnclosingNamespaceContext | ( | ) |
Retrieve the nearest enclosing namespace context.
Definition at line 1179 of file DeclBase.cpp.
References getParent(), getPrimaryContext(), and isFileContext().
Referenced by clang::Sema::ActOnTag(), clang::Sema::CheckEquivalentExceptionSpec(), CheckExplicitInstantiationScope(), CheckTemplateSpecializationScope(), getEnclosingNamespaceContext(), and isOutOfScopePreviousDeclaration().
| const DeclContext* clang::DeclContext::getEnclosingNamespaceContext | ( | ) | const [inline] |
Definition at line 1116 of file DeclBase.h.
References getEnclosingNamespaceContext().
| DeclContext* clang::DeclContext::getLexicalParent | ( | ) | [inline] |
getLexicalParent - Returns the containing lexical DeclContext. May be different from getParent, e.g.:
namespace A { struct S; } struct A::S {}; // getParent() == namespace 'A' getLexicalParent() == translation unit
Definition at line 991 of file DeclBase.h.
Referenced by clang::Sema::DiagnoseEmptyLookup(), clang::Sema::getContainingDC(), getLexicalParent(), getLookupParent(), and isDependentContext().
| const DeclContext* clang::DeclContext::getLexicalParent | ( | ) | const [inline] |
Definition at line 994 of file DeclBase.h.
References getLexicalParent().
| DeclContext * DeclContext::getLookupParent | ( | ) |
Find the parent context of this context that will be used for unqualified name lookup.
Generally, the parent lookup context is the semantic context. However, for a friend function the parent lookup context is the lexical context, which is the class in which the friend is declared.
Definition at line 713 of file DeclBase.cpp.
References getLexicalParent(), getParent(), getRedeclContext(), isFileContext(), and isRecord().
Referenced by clang::Sema::CheckClassTemplate(), clang::Sema::CheckTemplateIdType(), getLookupParent(), and LookupVisibleDecls().
| const DeclContext* clang::DeclContext::getLookupParent | ( | ) | const [inline] |
Definition at line 1000 of file DeclBase.h.
References getLookupParent().
| StoredDeclsMap* clang::DeclContext::getLookupPtr | ( | ) | const [inline] |
Retrieve the internal representation of the lookup structure.
Definition at line 1452 of file DeclBase.h.
Referenced by clang::ASTDeclWriter::VisitNamespaceDecl().
| DeclContext * DeclContext::getNonClosureAncestor | ( | ) |
Find the nearest non-closure ancestor of this context, i.e. the innermost semantic parent of this context which is not a closure. A context may be its own non-closure ancestor.
Definition at line 670 of file DeclBase.cpp.
References isClosure().
Referenced by getNonClosureAncestor(), clang::Decl::getNonClosureContext(), clang::Sema::isSelfExpr(), and LookupMethodInReceiverType().
| const DeclContext* clang::DeclContext::getNonClosureAncestor | ( | ) | const [inline] |
Definition at line 1091 of file DeclBase.h.
References getNonClosureAncestor().
| DeclContext* clang::DeclContext::getParent | ( | ) | [inline] |
getParent - Returns the containing DeclContext.
Reimplemented in clang::CXXMethodDecl.
Definition at line 975 of file DeclBase.h.
Referenced by clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnTag(), clang::Sema::ActOnUsingDirective(), CheckAddressOfOperand(), clang::Sema::CheckConstexprFunctionBody(), clang::Sema::CheckConstexprFunctionDecl(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckQualifiedMemberReference(), clang::Sema::CheckTemplateDeclScope(), clang::Sema::CheckUsingShadowDecl(), ClassifyImplicitMemberAccess(), CollectEnclosingNamespace(), clang::ASTContext::DeclMustBeEmitted(), DiagnoseAccessPath(), clang::Sema::DiagnoseEmptyLookup(), clang::DiagnoseTwoPhaseLookup(), diagnoseUncapturableValueReference(), dumpDeclContext(), Encloses(), clang::Sema::FindInstantiatedDecl(), findOuterContext(), clang::CodeGen::CodeGenVTables::GenerateClassData(), getCurrentInstantiationOf(), getEnclosingNamespaceContext(), clang::Sema::getFunctionLevelDeclContext(), getLookupParent(), getLVForNamespaceScopeDecl(), getParent(), clang::NamedDecl::getQualifiedNameAsString(), getRedeclContext(), clang::Sema::getTemplateInstantiationArgs(), clang::Decl::getTranslationUnitDecl(), clang::Sema::HandleDeclarator(), handleIBOutletCollection(), IgnoreLinkageSpecDecls(), InEnclosingNamespaceSetOf(), clang::Sema::InstantiateMemInitializers(), IsAccessible(), clang::NamedDecl::isCXXClassMember(), isDependentContext(), isExternCContext(), clang::Decl::isInAnonymousNamespace(), clang::Sema::IsInsideALocalClassWithinATemplateFunction(), isStd(), IsUsingDirectiveInToplevelContext(), clang::MangleContext::mangleBlock(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), MaybeAddOverrideCalls(), clang::CodeGen::CGRecordLayout::print(), clang::Sema::TryCaptureVar(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), and clang::ASTDeclWriter::VisitNamespaceDecl().
| const DeclContext* clang::DeclContext::getParent | ( | ) | const [inline] |
Reimplemented in clang::CXXMethodDecl.
Definition at line 978 of file DeclBase.h.
References getParent().
| ASTContext& clang::DeclContext::getParentASTContext | ( | ) | const [inline] |
Definition at line 1004 of file DeclBase.h.
Referenced by lookup(), clang::ExternalASTSource::SetExternalVisibleDeclsForName(), and clang::ExternalASTSource::SetNoExternalVisibleDeclsForName().
| DeclContext * DeclContext::getPrimaryContext | ( | ) |
getPrimaryContext - There may be many different declarations of the same entity (including forward declarations of classes, multiple definitions of namespaces, etc.), each with a different set of declarations. This routine returns the "primary" DeclContext structure, which will contain the information needed to perform name lookup into this context.
Definition at line 782 of file DeclBase.cpp.
References clang::TagType::getDecl(), clang::ObjCInterfaceDecl::getDefinition(), clang::ObjCProtocolDecl::getDefinition(), clang::TagDecl::getDefinition(), and clang::TagType::isBeingDefined().
Referenced by CollectEnclosingNamespace(), ddiag_begin(), Encloses(), Equals(), getEnclosingNamespaceContext(), getPrimaryContext(), clang::Sema::getScopeForContext(), clang::Sema::getScopeForDeclContext(), lookup(), LookupVisibleDecls(), MightInstantiateTo(), removeDecl(), and clang::ASTDeclWriter::VisitNamespaceDecl().
| const DeclContext* clang::DeclContext::getPrimaryContext | ( | ) | const [inline] |
Definition at line 1102 of file DeclBase.h.
References getPrimaryContext().
| DeclContext * DeclContext::getRedeclContext | ( | ) |
getRedeclContext - Retrieve the context in which an entity conflicts with other entities of the same name, or where it is a redeclaration if the two entities are compatible. This skips through transparent contexts.
Definition at line 1171 of file DeclBase.cpp.
References getParent(), and isTransparentContext().
Referenced by clang::Sema::ActOnEnumConstant(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnTag(), clang::Sema::ActOnTypedefNameDecl(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckDependentFunctionTemplateSpecialization(), CheckExplicitInstantiationScope(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::CheckObjCDeclScope(), CheckOperatorNewDeleteDeclarationScope(), CheckTemplateSpecializationScope(), clang::Sema::CheckUsingDeclRedeclaration(), getFunctionStorageClass(), getLookupParent(), getLVForDecl(), getLVForNamespaceScopeDecl(), clang::CodeCompletionResult::getPriorityFromDecl(), getRedeclContext(), handleWeakRefAttr(), clang::IdentifierResolver::isDeclInScope(), clang::VarDecl::isFunctionOrMethodVarDecl(), clang::FunctionDecl::isMain(), isOutOfScopePreviousDeclaration(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), isSameEntity(), clang::Sema::LookupName(), clang::Sema::PushOnScopeChains(), clang::Sema::ShouldEnterDeclaratorScope(), clang::IdentifierResolver::tryAddTopLevelDecl(), clang::TemplateDeclInstantiator::VisitCXXRecordDecl(), and clang::ASTDeclWriter::VisitNamespaceDecl().
| const DeclContext* clang::DeclContext::getRedeclContext | ( | ) | const [inline] |
Definition at line 1110 of file DeclBase.h.
References getRedeclContext().
| DeclContext::udir_iterator_range DeclContext::getUsingDirectives | ( | ) | const |
Returns iterator range [First, Last) of UsingDirectiveDecls stored within this context.
Definition at line 1297 of file DeclBase.cpp.
References lookup().
Referenced by LookupQualifiedNameInUsingDirectives(), LookupVisibleDecls(), using_directives_begin(), and using_directives_end().
| bool clang::DeclContext::hasExternalLexicalStorage | ( | ) | const [inline] |
Whether this DeclContext has external storage containing additional declarations that are lexically in this context.
Definition at line 1456 of file DeclBase.h.
Referenced by decls_begin(), decls_empty(), decls_end(), clang::RecordDecl::field_begin(), clang::ASTContext::getASTRecordLayout(), localUncachedLookup(), and clang::Sema::RequireCompleteType().
| bool clang::DeclContext::hasExternalVisibleStorage | ( | ) | const [inline] |
Whether this DeclContext has external storage containing additional declarations that are visible in this context.
Definition at line 1466 of file DeclBase.h.
Referenced by clang::ASTReader::FindExternalVisibleDeclsByName(), localUncachedLookup(), and lookup().
| bool DeclContext::InEnclosingNamespaceSetOf | ( | const DeclContext * | NS | ) | const |
Test if this context is part of the enclosing namespace set of the context NS, as defined in C++0x [namespace.def]p9. If either context isn't a namespace, this is equivalent to Equals().
The enclosing namespace set of a namespace is the namespace and, if it is inline, its enclosing namespace, recursively.
Definition at line 1187 of file DeclBase.cpp.
References Equals(), getParent(), isFileContext(), and clang::NamespaceDecl::isInline().
Referenced by clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::CheckDependentFunctionTemplateSpecialization(), CheckExplicitInstantiationScope(), clang::Sema::CheckFunctionTemplateSpecialization(), CheckTemplateSpecializationScope(), clang::IdentifierResolver::isDeclInScope(), and clang::Sema::isStdInitializerList().
| bool clang::DeclContext::isClosure | ( | ) | const [inline] |
Definition at line 1008 of file DeclBase.h.
Referenced by getNonClosureAncestor().
| bool clang::DeclContext::isDeclInLexicalTraversal | ( | const Decl * | D | ) | const [inline] |
Determine whether the given declaration is stored in the list of declarations lexically within this context.
Definition at line 1476 of file DeclBase.h.
References FirstDecl, LastDecl, and clang::Decl::NextInContextAndBits.
| bool DeclContext::isDependentContext | ( | ) | const |
Determines whether this context is dependent on a template parameter.
Definition at line 728 of file DeclBase.cpp.
References getLexicalParent(), getParent(), isDependentContext(), and isFileContext().
Referenced by clang::Sema::ActOnCXXEnterDeclaratorScope(), clang::Sema::ActOnDependentTemplateName(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), AddOrdinaryNameResults(), clang::CXXMethodDecl::addOverriddenMethod(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildMemberInitializer(), clang::Sema::BuildQualifiedDeclarationNameExpr(), CanDeclareSpecialMemberFunction(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckPureMethod(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckUsingDeclQualifier(), clang::Sema::CodeCompleteMemberReferenceExpr(), computeDeclRefDependence(), ddiag_begin(), DiagnoseBaseOrMemInitializerOrder(), clang::CodeGen::CodeGenModule::EmitTopLevelDecl(), clang::Sema::FinalizeVarWithDestructor(), clang::Sema::FindInstantiatedDecl(), clang::Sema::getDestructorName(), clang::Sema::getTypeName(), clang::Sema::HandleDeclarator(), clang::CXXRecordDecl::hasAnyDependentBases(), clang::TemplateArgument::isDependent(), isDependentContext(), IsDerivedFromInclusive(), clang::TemplateArgument::isInstantiationDependent(), clang::Sema::isNonTypeNestedNameSpecifier(), clang::Expr::isPotentialConstantExpr(), IsPotentiallyEvaluatedContext(), clang::Sema::LookupParsedName(), clang::Sema::LookupQualifiedName(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::Sema::MarkVTableUsed(), clang::CXXRecordDecl::mayBeAbstract(), clang::Sema::MergeCXXFunctionDecl(), MightInstantiateTo(), clang::Sema::SetCtorInitializers(), and clang::Sema::ShouldWarnIfUnusedFileScopedDecl().
| bool DeclContext::isExternCContext | ( | ) | const |
Determines whether this context is, or is nested within, a C++ extern "C" linkage spec.
Definition at line 761 of file DeclBase.cpp.
References getParent(), and clang::LinkageSpecDecl::lang_c.
Referenced by getLVForNamespaceScopeDecl(), clang::VarDecl::isExternC(), and clang::FunctionDecl::isExternC().
| bool clang::DeclContext::isFileContext | ( | ) | const [inline] |
Definition at line 1034 of file DeclBase.h.
Referenced by clang::Sema::ActOnDeclarator(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::ASTUnit::addFileLevelDecl(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckShadow(), clang::Sema::CheckTemplateDeclScope(), clang::Sema::CodeCompleteNamespaceDecl(), CollectEnclosingNamespace(), CppNamespaceLookup(), clang::Sema::FindInstantiatedDecl(), findOuterContext(), getCurrentInstantiationOf(), clang::Sema::getDestructorName(), getEnclosingNamespaceContext(), getLookupParent(), getLVForDecl(), getLVForNamespaceScopeDecl(), clang::Sema::getTemplateInstantiationArgs(), InEnclosingNamespaceSetOf(), isDependentContext(), clang::Sema::LookupQualifiedName(), LookupQualifiedNameInUsingDirectives(), mapCodeCompletionContext(), MightInstantiateTo(), clang::Sema::ShouldEnterDeclaratorScope(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
| bool clang::DeclContext::isFunctionOrMethod | ( | ) | const [inline] |
Definition at line 1024 of file DeclBase.h.
Referenced by clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnTag(), clang::Sema::BuildCXXNestedNameSpecifier(), CheckTemplateSpecializationScope(), computeCachedProperties(), diagnoseUncapturableValueReference(), clang::Sema::FindInstantiatedDecl(), getFunctionStorageClass(), getLVForDecl(), clang::CodeCompletionResult::getPriorityFromDecl(), clang::NamedDecl::getQualifiedNameAsString(), clang::Sema::HandleDelayedAccessCheck(), clang::IdentifierResolver::isDeclInScope(), clang::VarDecl::isFunctionOrMethodVarDecl(), isOutOfScopePreviousDeclaration(), LookupVisibleDecls(), clang::MangleContext::mangleBlock(), clang::Sema::ParsedFreeStandingDeclSpec(), clang::Sema::RegisterLocallyScopedExternCDecl(), ShouldDiagnoseUnusedDecl(), clang::Sema::UseArgumentDependentLookup(), clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitCXXRecordDecl(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::TemplateDeclInstantiator::VisitEnumDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::ASTNodeImporter::VisitTypedefNameDecl(), clang::TemplateDeclInstantiator::VisitUsingDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().
| bool DeclContext::isInlineNamespace | ( | ) | const |
Definition at line 723 of file DeclBase.cpp.
References isNamespace().
Referenced by CollectEnclosingNamespace().
| bool clang::DeclContext::isNamespace | ( | ) | const [inline] |
Definition at line 1046 of file DeclBase.h.
Referenced by clang::ASTReader::FindExternalVisibleDeclsByName(), clang::FunctionDecl::isGlobal(), isInlineNamespace(), clang::Sema::IsInsideALocalClassWithinATemplateFunction(), isStdNamespace(), and clang::TemplateDeclInstantiator::VisitClassTemplateDecl().
| bool clang::DeclContext::isObjCContainer | ( | ) | const [inline] |
Definition at line 1012 of file DeclBase.h.
Referenced by clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnTag(), clang::Sema::CodeCompleteObjCAtDirective(), and clang::Sema::CodeCompleteObjCMethodDecl().
| bool clang::DeclContext::isRecord | ( | ) | const [inline] |
Definition at line 1042 of file DeclBase.h.
Referenced by clang::Sema::ActOnFields(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnTag(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildAnonymousStructOrUnion(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildUsingDeclaration(), CheckAddressOfOperand(), clang::Sema::CheckClassTemplate(), CheckExplicitInstantiationScope(), clang::Sema::CheckQualifiedMemberReference(), clang::Sema::CheckShadow(), clang::Sema::CheckTemplateDeclScope(), CheckTemplateSpecializationScope(), clang::Sema::CheckUsingDeclQualifier(), clang::Sema::CheckUsingDeclRedeclaration(), clang::Sema::CheckUsingShadowDecl(), ClassifyMemberExpr(), CollectEnclosingNamespace(), CreateNewFunctionDecl(), clang::Sema::DiagnoseEmptyLookup(), GetFullTypeForDeclarator(), getLookupParent(), getLVForDecl(), clang::CodeCompletionResult::getPriorityFromDecl(), clang::NamedDecl::isCXXClassMember(), clang::VarDecl::isExternC(), clang::FunctionDecl::isExternC(), clang::RecordDecl::isInjectedClassName(), isOutOfScopePreviousDeclaration(), clang::VarDecl::isStaticDataMember(), mapCodeCompletionContext(), clang::Sema::MergeVarDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), and clang::TemplateDeclInstantiator::VisitUsingDecl().
| bool clang::DeclContext::isTranslationUnit | ( | ) | const [inline] |
Definition at line 1038 of file DeclBase.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnTag(), clang::Sema::ActOnTypedefNameDecl(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::CheckEquivalentExceptionSpec(), dumpDeclContext(), clang::FormatASTNodeDiagnosticArgument(), clang::CodeGen::CodeGenVTables::GenerateClassData(), clang::FunctionDecl::getBuiltinID(), clang::Decl::getParentFunctionOrMethod(), clang::Sema::getTemplateInstantiationArgs(), clang::Decl::getTranslationUnitDecl(), isInCLinkageSpecification(), clang::Sema::IsInsideALocalClassWithinATemplateFunction(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), LookupDirect(), RedeclForcesDefC99(), clang::IdentifierResolver::tryAddTopLevelDecl(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), and clang::idx::EntityGetter::VisitNamedDecl().
| bool DeclContext::isTransparentContext | ( | ) | const |
isTransparentContext - Determines whether this context is a "transparent" context, meaning that the members declared in this context are semantically declared in the nearest enclosing non-transparent (opaque) context but are lexically declared in this context. For example, consider the enumerators of an enumeration type:
enum E {
Val1
};
Here, E is a transparent context, so its enumerator (Val1) will appear (semantically) that it is in the same context of E. Examples of transparent contexts include: enumerations (except for C++0x scoped enums), and C++ linkage specifications.
Definition at line 752 of file DeclBase.cpp.
Referenced by clang::Sema::ActOnTag(), clang::Sema::CheckQualifiedMemberReference(), CollectEnclosingNamespace(), and getRedeclContext().
| void DeclContext::localUncachedLookup | ( | DeclarationName | Name, |
| llvm::SmallVectorImpl< NamedDecl * > & | Results | ||
| ) |
A simplistic name lookup mechanism that performs name lookup into this declaration context without consulting the external source.
This function should almost never be used, because it subverts the usual relationship between a DeclContext and the external source. See the ASTImporter for the (few, but important) use cases.
Definition at line 1139 of file DeclBase.cpp.
References FirstDecl, clang::Decl::getNextDeclInContext(), hasExternalLexicalStorage(), hasExternalVisibleStorage(), and lookup().
Referenced by clang::ASTNodeImporter::VisitClassTemplateDecl(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::ASTNodeImporter::VisitIndirectFieldDecl(), clang::ASTNodeImporter::VisitNamespaceDecl(), clang::ASTNodeImporter::VisitObjCInterfaceDecl(), clang::ASTNodeImporter::VisitObjCIvarDecl(), clang::ASTNodeImporter::VisitObjCMethodDecl(), clang::ASTNodeImporter::VisitObjCPropertyDecl(), clang::ASTNodeImporter::VisitObjCProtocolDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::ASTNodeImporter::VisitTypedefNameDecl(), and clang::ASTNodeImporter::VisitVarDecl().
| DeclContext::lookup_result DeclContext::lookup | ( | DeclarationName | Name | ) |
lookup - Find the declarations (if any) with the given Name in this context. Returns a range of iterators that contains all of the declarations with this name, with object, function, member, and enumerator names preceding any tag name. Note that this routine will not look into parent contexts.
If there is no lookup data structure, build one now by walking all of the linked DeclContexts (in declaration order!) and inserting their values.
Definition at line 1101 of file DeclBase.cpp.
References clang::ExternalASTSource::FindExternalVisibleDeclsByName(), clang::ASTContext::getExternalSource(), getParentASTContext(), getPrimaryContext(), hasExternalVisibleStorage(), and lookup().
Referenced by clang::Sema::ActOnStartNamespaceDef(), clang::Sema::BuildMemInitializer(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::DiagnoseHiddenVirtualMethods(), FindHiddenVirtualMethod(), clang::Sema::FindInstantiatedDecl(), clang::CXXRecordDecl::FindNestedNameSpecifierMember(), clang::CXXRecordDecl::FindOrdinaryMember(), FindOverriddenMethod(), clang::ObjCPropertyDecl::findPropertyDecl(), clang::CXXRecordDecl::FindTagMember(), clang::LambdaExpr::getCallOperator(), clang::CXXRecordDecl::getCopyAssignmentOperator(), clang::CXXRecordDecl::getCopyConstructor(), clang::idx::EntityImpl::getDecl(), getDefaultedDefaultConstructorUnsafe(), clang::CXXRecordDecl::getDestructor(), clang::ObjCContainerDecl::getIvarDecl(), clang::ObjCContainerDecl::getMethod(), getUsingDirectives(), clang::CXXMethodDecl::isUsualDeallocationFunction(), localUncachedLookup(), lookup(), LookupAnyMember(), clang::Sema::LookupConstructors(), LookupDirect(), clang::TreeTransform< Derived >::RebuildShuffleVectorExpr(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitClassTemplatePartialSpecializationDecl(), clang::ASTDeclWriter::VisitNamespaceDecl(), and clang::TemplateDeclInstantiator::VisitTypeAliasTemplateDecl().
| DeclContext::lookup_const_result DeclContext::lookup | ( | DeclarationName | Name | ) | const |
Definition at line 1135 of file DeclBase.cpp.
References lookup().
| void DeclContext::makeDeclVisibleInContext | ( | NamedDecl * | D, |
| bool | Recoverable = true |
||
| ) |
Makes a declaration visible within this context.
This routine makes the declaration D visible to name lookup within this context and, if this is a transparent context, within its parent contexts up to the first enclosing non-transparent context. Making a declaration visible within a context does not transfer ownership of a declaration, and a declaration can be visible in many contexts that aren't its lexical context.
If D is a redeclaration of an existing declaration that is visible from this context, as determined by NamedDecl::declarationReplaces, the previous declaration will be replaced with D.
| Recoverable | true if it's okay to not add this decl to the lookup tables because it can be easily recovered by walking the declaration chains. |
Definition at line 1205 of file DeclBase.cpp.
Referenced by clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnTag(), clang::Sema::CheckClassTemplate(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().
| DeclContext::decl_iterator DeclContext::noload_decls_begin | ( | ) | const |
noload_decls_begin/end - Iterate over the declarations stored in this context that are currently loaded; don't attempt to retrieve anything from an external source.
Definition at line 962 of file DeclBase.cpp.
References FirstDecl.
| DeclContext::decl_iterator DeclContext::noload_decls_end | ( | ) | const |
Definition at line 966 of file DeclBase.cpp.
| void DeclContext::removeDecl | ( | Decl * | D | ) |
Removes a declaration from this context.
Definition at line 991 of file DeclBase.cpp.
References FirstDecl, clang::NamedDecl::getDeclName(), clang::Decl::getLexicalDeclContext(), getPrimaryContext(), LastDecl, and clang::Decl::NextInContextAndBits.
Referenced by clang::Sema::HideUsingShadowDecl().
| void clang::DeclContext::setHasExternalLexicalStorage | ( | bool | ES = true | ) | [inline] |
State whether this DeclContext has external storage for declarations lexically in this context.
Definition at line 1460 of file DeclBase.h.
| void clang::DeclContext::setHasExternalVisibleStorage | ( | bool | ES = true | ) | [inline] |
State whether this DeclContext has external storage for declarations visible in this context.
Definition at line 1470 of file DeclBase.h.
| udir_iterator clang::DeclContext::using_directives_begin | ( | ) | const [inline] |
Definition at line 1436 of file DeclBase.h.
References getUsingDirectives().
Referenced by LookupQualifiedNameInUsingDirectives().
| udir_iterator clang::DeclContext::using_directives_end | ( | ) | const [inline] |
Definition at line 1440 of file DeclBase.h.
References getUsingDirectives().
Referenced by LookupQualifiedNameInUsingDirectives().
friend class DependentDiagnostic [friend] |
Definition at line 1502 of file DeclBase.h.
friend class ExternalASTSource [friend] |
Definition at line 953 of file DeclBase.h.
Decl* clang::DeclContext::FirstDecl [mutable, protected] |
FirstDecl - The first declaration stored within this declaration context.
Definition at line 945 of file DeclBase.h.
Referenced by addHiddenDecl(), decls_begin(), decls_empty(), clang::RecordDecl::field_begin(), isDeclInLexicalTraversal(), localUncachedLookup(), noload_decls_begin(), and removeDecl().
Decl* clang::DeclContext::LastDecl [mutable, protected] |
LastDecl - The last declaration stored within this declaration context. FIXME: We could probably cache this value somewhere outside of the DeclContext, to reduce the size of DeclContext by another pointer.
Definition at line 951 of file DeclBase.h.
Referenced by addHiddenDecl(), isDeclInLexicalTraversal(), and removeDecl().