When we start the definition of a class template, set the
InjectedClassNameType's Decl to point at the definition. It's a little
messy, but we do the same thing with classes and their record types,
since much of Clang expects that the TagDecl* one gets out of a type
is the definition. Fixes several Boost.Proto failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102691 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/injected-class-name.cpp b/test/SemaTemplate/injected-class-name.cpp
index 586be18..4c21d25 100644
--- a/test/SemaTemplate/injected-class-name.cpp
+++ b/test/SemaTemplate/injected-class-name.cpp
@@ -48,3 +48,15 @@
   };
   template class A<int>;
 }
+
+namespace ForwardDecls {
+  template<typename T>
+  struct X;
+
+  template<typename T>
+  struct X {
+    typedef T foo;
+    typedef X<T> xt;
+    typename xt::foo *t;
+  };
+}