[cfe-commits] r78338 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDeclCXX.cpp

John McCall rjmccall at apple.com
Thu Aug 6 14:21:21 PDT 2009


Author: rjmccall
Date: Thu Aug  6 16:21:21 2009
New Revision: 78338

URL: http://llvm.org/viewvc/llvm-project?rev=78338&view=rev
Log:
Drop the friend-inner-class diagnostic from an extwarn to an ext and don't
guard its report on GNUMode.


Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/lib/Sema/SemaDeclCXX.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=78338&r1=78337&r2=78338&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Thu Aug  6 16:21:21 2009
@@ -299,7 +299,7 @@
   "friends can only be classes or functions">;
 def err_friend_is_member : Error<
   "friends cannot be members of the declaring class">;
-def extwarn_friend_inner_class : ExtWarn<
+def ext_friend_inner_class : Extension<
   "C++ 98 does not allow inner classes as friends">;
 def err_unelaborated_friend_type : Error<
   "must specify '%select{class|union}0' in a friend "

Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=78338&r1=78337&r2=78338&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Thu Aug  6 16:21:21 2009
@@ -3371,8 +3371,8 @@
     // Also, definitions currently get treated in a way that causes
     // this error, so only report it if we didn't see a definition.
     else if (RD->getDeclContext() == CurContext &&
-             !(getLangOptions().CPlusPlus0x || getLangOptions().GNUMode))
-      Diag(DS.getFriendSpecLoc(), diag::extwarn_friend_inner_class);
+             !getLangOptions().CPlusPlus0x)
+      Diag(DS.getFriendSpecLoc(), diag::ext_friend_inner_class);
 
     return DeclPtrTy::make(RD);
   }





More information about the cfe-commits mailing list