diff options
author | Anders Carlsson <andersca@mac.com> | 2009-08-29 01:13:02 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-08-29 01:13:02 +0000 |
commit | 54f70e19c872f5f3fa66343ce4a1a5e0c707eb09 (patch) | |
tree | a6e363e689053df44cfb48f45b846ed8c36565cc /lib/AST/DeclBase.cpp | |
parent | 598da5b01fa9e205f55db8b3b5cb20abec2d74cf (diff) |
Don't assert that friend declarations must have access specifiers for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80415 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 3ced0eff4c..5d30795abd 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -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"); } |