A class template partial specialization cannot be a friend. Fixes PR8649.

llvm-svn: 122325
diff --git a/clang/test/SemaTemplate/friend-template.cpp b/clang/test/SemaTemplate/friend-template.cpp
index 1d62804..419ae93 100644
--- a/clang/test/SemaTemplate/friend-template.cpp
+++ b/clang/test/SemaTemplate/friend-template.cpp
@@ -207,3 +207,12 @@
   }
 
 }
+
+namespace PR8649 {
+  template<typename T, typename U, unsigned N>
+  struct X {
+    template<unsigned M> friend class X<T, U, M>; // expected-error{{partial specialization cannot be declared as a friend}}
+  };
+
+  X<int, float, 7> x;
+}