forked from OSchip/llvm-project
Don't assert that friend declarations must have access specifiers for now.
llvm-svn: 80415
This commit is contained in:
parent
743dc0ef40
commit
6e1ca8315c
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue