xref: /minix3/external/bsd/llvm/dist/clang/test/SemaTemplate/instantiation-depth-subst-2.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc // RUN: %clang_cc1 -verify %s -ftemplate-depth 2
2f4a2713aSLionel Sambuc 
3f4a2713aSLionel Sambuc template<int N> struct S { };
4*0a6a1f1dSLionel Sambuc template<typename T> S<T() + T()> operator+(T, T); // expected-error {{instantiation exceeded maximum depth}} expected-note 2{{while substituting}}
5f4a2713aSLionel Sambuc S<0> s;
6*0a6a1f1dSLionel Sambuc int k = s + s; // expected-note {{while substituting}}
7