Don't assert that friend declarations must have access specifiers for now.

llvm-svn: 80415
This commit is contained in:
Anders Carlsson 2009-08-29 01:13:02 +00:00
parent 743dc0ef40
commit 6e1ca8315c
1 changed files with 10 additions and 2 deletions

View File

@ -379,8 +379,16 @@ SourceLocation Decl::getBodyRBrace() const {
#ifndef NDEBUG
void Decl::CheckAccessDeclContext() const {
assert((Access != AS_none || isa<TranslationUnitDecl>(this) ||
!isa<CXXRecordDecl>(getDeclContext())) &&
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 &&
"Access specifier is AS_none inside a record decl");
}