From: Douglas Gregor Date: Tue, 7 Apr 2009 20:58:25 +0000 (+0000) Subject: Allow us to ask for the access specifier of a translation unit X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c27f2bfd2e19429dd9206f9b019e11d4a570acf;p=clang Allow us to ask for the access specifier of a translation unit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68548 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 615bf00087..f098496f23 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -338,7 +338,8 @@ DeclContext *Decl::castToDeclContext(const Decl *D) { #ifndef NDEBUG void Decl::CheckAccessDeclContext() const { - assert((Access != AS_none || !isa(getDeclContext())) && + assert((Access != AS_none || isa(this) || + !isa(getDeclContext())) && "Access specifier is AS_none inside a record decl"); }