[cfe-commits] r80415 - /cfe/trunk/lib/AST/DeclBase.cpp

Anders Carlsson andersca at mac.com
Fri Aug 28 18:13:02 PDT 2009


Author: andersca
Date: Fri Aug 28 20:13:02 2009
New Revision: 80415

URL: http://llvm.org/viewvc/llvm-project?rev=80415&view=rev
Log:
Don't assert that friend declarations must have access specifiers for now.

Modified:
    cfe/trunk/lib/AST/DeclBase.cpp

Modified: cfe/trunk/lib/AST/DeclBase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclBase.cpp?rev=80415&r1=80414&r2=80415&view=diff

==============================================================================
--- cfe/trunk/lib/AST/DeclBase.cpp (original)
+++ cfe/trunk/lib/AST/DeclBase.cpp Fri Aug 28 20:13:02 2009
@@ -379,8 +379,16 @@
 
 #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");
 }
 





More information about the cfe-commits mailing list