Improve handling of friend types in several ways:
  - When instantiating a friend type template, perform semantic
  analysis on the resulting type.
  - Downgrade the errors concerning friend type declarations that do
  not refer to classes to ExtWarns in C++98/03. C++0x allows
  practically any type to be befriended, and ignores the friend
  declaration if the type is not a class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100635 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/cxx-friend.cpp b/test/Parser/cxx-friend.cpp
index 2fe30cd..59350b5 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-error {{must specify 'class' to befriend}}
-  friend U; // expected-error {{must specify 'union' to befriend}}
-  friend int; // expected-error {{friends can only be classes or functions}}
+  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 void myfunc();