Template instantiation for "typeof" for both types and expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72440 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/instantiate-type.cpp b/test/SemaTemplate/instantiate-type.cpp
new file mode 100644
index 0000000..48060c4
--- /dev/null
+++ b/test/SemaTemplate/instantiate-type.cpp
@@ -0,0 +1,17 @@
+// RUN: clang-cc -fsyntax-only %s
+
+int* f(int);
+float *f(...);
+
+template<typename T>
+struct X {
+  typedef typeof(T*) typeof_type;
+  typedef typeof(f(T())) typeof_expr;
+};
+
+int *iptr0;
+float *fptr0;
+X<int>::typeof_type &iptr1 = iptr0;
+
+X<int>::typeof_expr &iptr2 = iptr0;
+X<float*>::typeof_expr &fptr1 = fptr0;