Add some more tests for instantiation of declaration references. Also,
improve some error recovery with explicit template instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72484 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/instantiate-declref.cpp b/test/SemaTemplate/instantiate-declref.cpp
index cceaed0..3b6db38 100644
--- a/test/SemaTemplate/instantiate-declref.cpp
+++ b/test/SemaTemplate/instantiate-declref.cpp
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only -verify %s
 
 namespace N {
   struct Outer {
@@ -10,12 +10,22 @@
 
           static enum K1 { K1Val = sizeof(T) } Kind1;
           static enum { K2Val = sizeof(T)*2 } Kind2;
+          enum { K3Val = sizeof(T)*2 } Kind3;
 
           void foo() {
             K1 k1 = K1Val;
             Kind1 = K1Val;
             Outer::Inner::InnerTemplate<type>::VeryInner::Kind2 = K2Val;
+            Kind3 = K3Val;
           }
+
+          struct UeberInner {
+            void bar() {
+              K1 k1 = K1Val;
+              Kind1 = K1Val;
+              Outer::Inner::InnerTemplate<type>::VeryInner::Kind2 = K2Val;
+            }
+          };
         };
       };
     };
@@ -24,3 +34,4 @@
 
 typedef int INT;
 template struct N::Outer::Inner::InnerTemplate<INT>::VeryInner;
+template struct N::Outer::Inner::InnerTemplate<INT>::UeberInner; // expected-error{{'UeberInner' does not name a tag member}}