From: Bruno Ricci Date: Fri, 3 Aug 2018 13:31:20 +0000 (+0000) Subject: [AST][NFC] Small doc update for DeclContext X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b42d60ed740a26a9c6ee32f78181ce7d389cb998;p=clang [AST][NFC] Small doc update for DeclContext Factored out from https://reviews.llvm.org/D49729 following @erichkeane comments. * Add missing classes in the list of classes deriving directly from DeclContext. * Move the friend declarations together and add a comment for why they are required. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D49790 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338887 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index 3816da4222..3f7f756a34 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -1250,16 +1250,29 @@ public: /// that directly derive from DeclContext are mentioned, not their subclasses): /// /// TranslationUnitDecl +/// ExternCContext /// NamespaceDecl -/// FunctionDecl /// TagDecl +/// OMPDeclareReductionDecl +/// FunctionDecl /// ObjCMethodDecl /// ObjCContainerDecl /// LinkageSpecDecl /// ExportDecl /// BlockDecl -/// OMPDeclareReductionDecl +/// CapturedDecl class DeclContext { + /// For makeDeclVisibleInContextImpl + friend class ASTDeclReader; + /// For reconcileExternalVisibleStorage, CreateStoredDeclsMap, + /// hasNeedToReconcileExternalVisibleStorage + friend class ExternalASTSource; + /// For CreateStoredDeclsMap + friend class DependentDiagnostic; + /// For hasNeedToReconcileExternalVisibleStorage, + /// hasLazyLocalLexicalLookups, hasLazyExternalLexicalLookups + friend class ASTWriter; + // We use uint64_t in the bit-fields below since some bit-fields // cross the unsigned boundary and this breaks the packing. @@ -1716,10 +1729,6 @@ protected: "BlockDeclBitfields is larger than 8 bytes!"); }; - friend class ASTDeclReader; - friend class ASTWriter; - friend class ExternalASTSource; - /// FirstDecl - The first declaration stored within this declaration /// context. mutable Decl *FirstDecl = nullptr; @@ -2398,8 +2407,6 @@ private: DeclContextBits.HasLazyExternalLexicalLookups = HasLELL; } - friend class DependentDiagnostic; - void reconcileExternalVisibleStorage() const; bool LoadLexicalDeclsFromExternalStorage() const;