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 | 6e1ca8315c9517fe4daa66479bd622055e39e817 (patch) | |
tree | 0a7f47bc63a2086b626ccf755e39aeccfbe0ba0c /clang/lib/AST/DeclBase.cpp | |
parent | 743dc0ef4080fb4328fcb7a6dcfddc4813b7fbf7 (diff) | |
download | bcm5719-llvm-6e1ca8315c9517fe4daa66479bd622055e39e817.tar.gz bcm5719-llvm-6e1ca8315c9517fe4daa66479bd622055e39e817.zip |
Don't assert that friend declarations must have access specifiers for now.
llvm-svn: 80415
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
-rw-r--r-- | clang/lib/AST/DeclBase.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index 3ced0eff4c5..5d30795abd7 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/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"); } |