PR4794: Make instantiating friend class decls not crash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80272 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/instantiate-friend-class.cpp b/test/SemaTemplate/instantiate-friend-class.cpp
new file mode 100644
index 0000000..004bf1b
--- /dev/null
+++ b/test/SemaTemplate/instantiate-friend-class.cpp
@@ -0,0 +1,8 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+template <class T> class X
+{
+ friend class Y;
+};
+X<int> y;
+