brintos

brintos / llvm-project-archived public Read only

0
0
Text · 570 B · 4464fbb Raw
15 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -ftemplate-depth=16 -fcxx-exceptions -fexceptions %s2 3template<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};10 11void f() {12  int k = X<0>::go(0); // \13  // expected-note {{in instantiation of exception specification for 'go' requested here}}14}15