]> granicus.if.org Git - clang/commitdiff
Drop the friend-inner-class diagnostic from an extwarn to an ext and don't
authorJohn McCall <rjmccall@apple.com>
Thu, 6 Aug 2009 21:21:21 +0000 (21:21 +0000)
committerJohn McCall <rjmccall@apple.com>
Thu, 6 Aug 2009 21:21:21 +0000 (21:21 +0000)
guard its report on GNUMode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78338 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDeclCXX.cpp

index 17bf188bf37c8a38fe315f5fc878f3659fef0b8a..aac64cee65b8d5be0c6557ee9b8072e816210061 100644 (file)
@@ -299,7 +299,7 @@ def err_unexpected_friend : Error<
   "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 "
index 63b0b3d83d79be07b96ed47eef20203060033998..20862d4c81f03c7d2b62582f528551d82c034f11 100644 (file)
@@ -3371,8 +3371,8 @@ Sema::DeclPtrTy Sema::ActOnFriendDecl(Scope *S,
     // 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);
   }