]> granicus.if.org Git - clang/commitdiff
Add test missed from r278983.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 17 Aug 2016 21:42:10 +0000 (21:42 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 17 Aug 2016 21:42:10 +0000 (21:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278984 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaTemplate/instantiation-depth-default.cpp [new file with mode: 0644]

diff --git a/test/SemaTemplate/instantiation-depth-default.cpp b/test/SemaTemplate/instantiation-depth-default.cpp
new file mode 100644 (file)
index 0000000..b809e2a
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -ftemplate-backtrace-limit 2 %s
+
+template<int N, typename T> struct X : X<N+1, T*> {};
+// expected-error-re@3 {{recursive template instantiation exceeded maximum depth of 1024{{$}}}}
+// expected-note@3 {{instantiation of template class}}
+// expected-note@3 {{skipping 1023 contexts in backtrace}}
+// expected-note@3 {{use -ftemplate-depth=N to increase recursive template instantiation depth}}
+
+X<0, int> x; // expected-note {{in instantiation of}}