minix/external/bsd/llvm/dist/clang/test/SemaTemplate/instantiation-depth-exception-spec.cpp
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

11 lines
529 B
C++

// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -ftemplate-depth 16 -fcxx-exceptions -fexceptions %s
template<typename T> T go(T a) noexcept(noexcept(go(a))); // \
// expected-error 16{{call to function 'go' that is neither visible}} \
// expected-note 16{{'go' should be declared prior to the call site}} \
// expected-error {{recursive template instantiation exceeded maximum depth of 16}}
void f() {
int k = go(0); // \
// expected-note {{in instantiation of exception specification for 'go<int>' requested here}}
}