1f4a2713aSLionel Sambuc // RUN: %clang_cc1 -std=c++11 -verify %s -ftemplate-depth 2 2f4a2713aSLionel Sambuc 3f4a2713aSLionel Sambuc // PR9793 4f4a2713aSLionel Sambuc template<typename T> auto f(T t) -> decltype(f(t)); // \ 5f4a2713aSLionel Sambuc // expected-error {{recursive template instantiation exceeded maximum depth of 2}} \ 6*0a6a1f1dSLionel Sambuc // expected-note 2 {{while substituting}} 7f4a2713aSLionel Sambuc 8f4a2713aSLionel Sambuc struct S {}; 9*0a6a1f1dSLionel Sambuc int k = f(S{}); // expected-note {{while substituting}} 10