diff options
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 5d30795abd..3ced0eff4c 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -379,16 +379,8 @@ SourceLocation Decl::getBodyRBrace() const { #ifndef NDEBUG void Decl::CheckAccessDeclContext() const { - if (isa<TranslationUnitDecl>(this) || - !isa<CXXRecordDecl>(getDeclContext())) - return; - - // FIXME: Should friend declarations have access specifiers? - if (isa<FriendDecl>(this) || - getFriendObjectKind() != FOK_None) - return; - - assert(Access != AS_none && + assert((Access != AS_none || isa<TranslationUnitDecl>(this) || + !isa<CXXRecordDecl>(getDeclContext())) && "Access specifier is AS_none inside a record decl"); } |