summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/DelayedTemplateParsing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Parser/DelayedTemplateParsing.cpp')
-rw-r--r--clang/test/Parser/DelayedTemplateParsing.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/clang/test/Parser/DelayedTemplateParsing.cpp b/clang/test/Parser/DelayedTemplateParsing.cpp
new file mode 100644
index 00000000000..355250e4b04
--- /dev/null
+++ b/clang/test/Parser/DelayedTemplateParsing.cpp
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -fdelayed-template-parsing -fsyntax-only -verify %s
+
+template <class T>
+class A {
+
+ void foo() {
+ undeclared();
+ }
+
+ void foo2();
+};
+
+template <class T>
+void A<T>::foo2() {
+ undeclared();
+}
+
+
+template <class T>
+void foo3() {
+ undeclared();
+}
+
+template void A<int>::foo2();
+
+
+void undeclared()
+{
+
+}
+
OpenPOWER on IntegriCloud