blob: a29d6b5a1b4c3e86e7011fcd0138f4d71f4194f1 [file] [log] [blame]
Richard Smithab91ef12012-07-08 02:38:24 +00001// RUN: %clang_cc1 -verify %s -ftemplate-depth 2
2
3template<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.
7template<typename T> S<T() + T()> operator+(T, T); // expected-error 8{{}} expected-note 10{{}}
8S<0> s;
9int k = s + s; // expected-error {{invalid operands to binary expression}}