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