Tweak the diagnostics for the C++0x extensions to friend types to note
that they are C++0x extensions, and put them in the appropriate
group. We already support most of the semantics. Addresses
<rdar://problem/9407525>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131153 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CXX/class.access/class.friend/p2-cxx03.cpp b/test/CXX/class.access/class.friend/p2-cxx03.cpp
index 0391c4b..82cddc2 100644
--- a/test/CXX/class.access/class.friend/p2-cxx03.cpp
+++ b/test/CXX/class.access/class.friend/p2-cxx03.cpp
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -fsyntax-only -verify %s
 template<typename T>
 class X0 {
-  friend T; // expected-warning{{non-class type 'T' cannot be a friend}}
+  friend T; // expected-warning{{non-class friend type 'T' is a C++0x extension}}
 };
 
 class X1 { };
diff --git a/test/CXX/class/class.friend/p2.cpp b/test/CXX/class/class.friend/p2.cpp
index eb5036f..87b69c0 100644
--- a/test/CXX/class/class.friend/p2.cpp
+++ b/test/CXX/class/class.friend/p2.cpp
@@ -4,7 +4,7 @@
 
 class A {
   friend class B {}; // expected-error {{cannot define a type in a friend declaration}}
-  friend int; // expected-warning {{non-class type 'int' cannot be a friend}}
-  friend B0; // expected-warning {{must specify 'struct' to befriend}}
+  friend int; // expected-warning {{non-class friend type 'int' is a C++0x extension}}
+  friend B0; // expected-warning {{specify 'struct' to befriend 'B0'}}
   friend class C; // okay
 };
diff --git a/test/Parser/cxx-friend.cpp b/test/Parser/cxx-friend.cpp
index 59350b5..a13e7ba 100644
--- a/test/Parser/cxx-friend.cpp
+++ b/test/Parser/cxx-friend.cpp
@@ -21,9 +21,9 @@
   // 'A' here should refer to the declaration above.  
   friend class A;
 
-  friend C; // expected-warning {{must specify 'class' to befriend}}
-  friend U; // expected-warning {{must specify 'union' to befriend}}
-  friend int; // expected-warning {{non-class type 'int' cannot be a friend}}
+  friend C; // expected-warning {{specify 'class' to befriend}}
+  friend U; // expected-warning {{specify 'union' to befriend}}
+  friend int; // expected-warning {{non-class friend type 'int'}}
 
   friend void myfunc();