xref: /aosp_15_r20/external/clang/test/SemaTemplate/instantiation-depth-exception-spec.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -ftemplate-depth 16 -fcxx-exceptions -fexceptions %s
2 
3 template<typename T> T go(T a) noexcept(noexcept(go(a))); // \
4 // expected-error 16{{call to function 'go' that is neither visible}} \
5 // expected-note 16{{'go' should be declared prior to the call site}} \
6 // expected-error {{recursive template instantiation exceeded maximum depth of 16}}
7 
f()8 void f() {
9   int k = go(0); // \
10   // expected-note {{in instantiation of exception specification for 'go<int>' requested here}}
11 }
12