2012-07-08 10:38:24 +08:00
|
|
|
// RUN: %clang_cc1 -std=c++11 -verify %s -ftemplate-depth 2
|
|
|
|
|
|
|
|
// PR9793
|
|
|
|
template<typename T> auto f(T t) -> decltype(f(t)); // \
|
|
|
|
// expected-error {{recursive template instantiation exceeded maximum depth of 2}} \
|
2014-01-11 10:37:12 +08:00
|
|
|
// expected-note 2 {{while substituting}}
|
2012-07-08 10:38:24 +08:00
|
|
|
|
2012-09-22 08:53:56 +08:00
|
|
|
struct S {};
|
2014-01-11 10:37:12 +08:00
|
|
|
int k = f(S{}); // expected-note {{while substituting}}
|