added type dependent testcase

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67230 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/instantiate-expr-2.cpp b/test/SemaTemplate/instantiate-expr-2.cpp
index 7cfaa9c..b2c43ee 100644
--- a/test/SemaTemplate/instantiate-expr-2.cpp
+++ b/test/SemaTemplate/instantiate-expr-2.cpp
@@ -84,9 +84,9 @@
 */
 
 namespace N6 {
+  // non-typedependent
   template<int I>
-  struct Lookup {
-  };
+  struct Lookup {};
 
   template<bool B, typename T, typename E>
   struct Cond {
@@ -103,3 +103,20 @@
 }
 
 
+namespace N7 {
+  // type dependent
+  template<int I>
+  struct Lookup {};
+
+  template<bool B, typename T, typename E>
+  struct Cond {
+    T foo() { return B ? T() : E(); }
+    typedef Lookup<sizeof(B ? T() : E())> Type;
+  };
+
+  //Cond<true, int*, double> C; // Errors
+  //int V(C.foo()); // Errors
+  //typedef Cond<true, int*, double>::Type Type; // Errors + CRASHES!
+  typedef Cond<true, int, double>::Type Type;
+}
+