summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/instantiate-type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/instantiate-type.cpp')
-rw-r--r--test/SemaTemplate/instantiate-type.cpp17
1 files changed, 17 insertions, 0 deletions
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;
OpenPOWER on IntegriCloud