summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-08-17 21:42:10 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-08-17 21:42:10 +0000
commit269762dad347a916e342360f0330869ca0938e60 (patch)
treeea3abb00a20182e1b56085353ab74673ece1ba02
parente55b4737c026ea2e0b44829e4115d208577a67b2 (diff)
downloadbcm5719-llvm-269762dad347a916e342360f0330869ca0938e60.tar.gz
bcm5719-llvm-269762dad347a916e342360f0330869ca0938e60.zip
Add test missed from r278983.
llvm-svn: 278984
-rw-r--r--clang/test/SemaTemplate/instantiation-depth-default.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiation-depth-default.cpp b/clang/test/SemaTemplate/instantiation-depth-default.cpp
new file mode 100644
index 00000000000..b809e2a2ccf
--- /dev/null
+++ b/clang/test/SemaTemplate/instantiation-depth-default.cpp
@@ -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}}
OpenPOWER on IntegriCloud