// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify // rdar://12645424, crash due to a double-free template struct __add_lvalue_reference_helper {}; template struct add_lvalue_reference : __add_lvalue_reference_helper<_Tp> { typedef _Tp type; }; template struct type_list; template class... Funs> struct C; template struct C { typedef T type; }; template class Fun0, template class... Funs> struct C { typedef typename C::type, Funs...>::type type; }; template class... Funs> struct tl_map; template class... Funs> struct tl_map, Funs...> { typedef type_list::type...> type; }; template< class Pattern> struct F { typedef Pattern filtered_pattern; tl_map< filtered_pattern, add_lvalue_reference > type; }; template struct get_case { F type; }; template struct rvalue_builder { template typename get_case::type operator>>(Expr ); // expected-note {{candidate template ignored}} }; template rvalue_builder< type_list > on(const Arg0& ) ; class Z { int empty = on(0) >> [] {}; // expected-error {{invalid operands to binary expression}} };