r338887 - [AST][NFC] Small doc update for DeclContext
Bruno Ricci via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 3 06:31:20 PDT 2018
Author: brunoricci
Date: Fri Aug 3 06:31:20 2018
New Revision: 338887
URL: http://llvm.org/viewvc/llvm-project?rev=338887&view=rev
Log:
[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
Modified:
cfe/trunk/include/clang/AST/DeclBase.h
Modified: cfe/trunk/include/clang/AST/DeclBase.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclBase.h?rev=338887&r1=338886&r2=338887&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclBase.h (original)
+++ cfe/trunk/include/clang/AST/DeclBase.h Fri Aug 3 06:31:20 2018
@@ -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;
More information about the cfe-commits
mailing list