blob: 3f64811bd10819e5924abcd55ca8e86f2e4bd49a [file] [log] [blame]
Richard Smith6d12af72012-09-22 00:53:56 +00001// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -ftemplate-depth 16 -fcxx-exceptions -fexceptions %s
2
Richard Smith54f18e82016-08-31 02:15:21 +00003template<int N> struct X {
4 static int go(int a) noexcept(noexcept(X<N+1>::go(a))); // \
5// expected-error {{recursive template instantiation exceeded maximum depth of 16}} \
6// expected-note 9{{in instantiation of exception specification}} \
7// expected-note {{skipping 7 context}} \
8// expected-note {{use -ftemplate-depth}}
9};
Richard Smith6d12af72012-09-22 00:53:56 +000010
11void f() {
Richard Smith54f18e82016-08-31 02:15:21 +000012 int k = X<0>::go(0); // \
13 // expected-note {{in instantiation of exception specification for 'go' requested here}}
Richard Smith6d12af72012-09-22 00:53:56 +000014}