aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/C++Frontend/2004-06-08-LateTemplateInstantiation.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/C++Frontend/2004-06-08-LateTemplateInstantiation.cpp b/test/C++Frontend/2004-06-08-LateTemplateInstantiation.cpp
new file mode 100644
index 0000000000..5d04d23ef2
--- /dev/null
+++ b/test/C++Frontend/2004-06-08-LateTemplateInstantiation.cpp
@@ -0,0 +1,17 @@
+
+
+template<typename Ty>
+struct normal_iterator {
+ int FIELD;
+};
+
+void foo(normal_iterator<int>);
+normal_iterator<int> baz();
+
+void bar() {
+ foo(baz());
+}
+
+void *bar2() {
+ return (void*)foo;
+}