• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -verify %s -ftemplate-depth 2
2 
3 template<int N> struct S { };
4 // FIXME: We produce the same 'instantiation depth' error here many times
5 // (2^(depth+1) in total), due to additional lookups performed as part of
6 // error recovery in DiagnoseTwoPhaseOperatorLookup.
7 template<typename T> S<T() + T()> operator+(T, T); // expected-error 8{{}} expected-note 10{{}}
8 S<0> s;
9 int k = s + s; // expected-error {{invalid operands to binary expression}}
10