blob: 2a3e422ac7afd3ee2a439f314f14e2688ad64254 [file] [log] [blame]
Richard Smith8a874c92012-07-08 02:38:24 +00001// RUN: %clang_cc1 -std=c++11 -verify %s -ftemplate-depth 2
2
3// PR9793
4template<typename T> auto f(T t) -> decltype(f(t)); // \
5// expected-error {{recursive template instantiation exceeded maximum depth of 2}} \
Nick Lewycky56412332014-01-11 02:37:12 +00006// expected-note 2 {{while substituting}}
Richard Smith8a874c92012-07-08 02:38:24 +00007
Richard Smith6d12af72012-09-22 00:53:56 +00008struct S {};
Nick Lewycky56412332014-01-11 02:37:12 +00009int k = f(S{}); // expected-note {{while substituting}}