Richard Smith | 6d12af7 | 2012-09-22 00:53:56 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -ftemplate-depth 16 -fcxx-exceptions -fexceptions %s |
| 2 | |
Richard Smith | 54f18e8 | 2016-08-31 02:15:21 +0000 | [diff] [blame] | 3 | template<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 Smith | 6d12af7 | 2012-09-22 00:53:56 +0000 | [diff] [blame] | 10 | |
| 11 | void f() { |
Richard Smith | 54f18e8 | 2016-08-31 02:15:21 +0000 | [diff] [blame] | 12 | int k = X<0>::go(0); // \ |
| 13 | // expected-note {{in instantiation of exception specification for 'go' requested here}} |
Richard Smith | 6d12af7 | 2012-09-22 00:53:56 +0000 | [diff] [blame] | 14 | } |