1 // RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
2 // RUN: %clang_cc1 %s -DREDEFINE -verify
3 // PR8007: friend function not instantiated.
5 // CHECK: define linkonce_odr{{.*}}_ZlsR11std_ostreamRK8StreamerI3FooE
14 template <typename STRUCT_TYPE
>
17 friend std_ostream
& operator << (std_ostream
& o
, const Streamer
& f
) // expected-error{{redefinition of 'operator<<'}}
24 Streamer(const STRUCT_TYPE
& s
) : s(s
) {}
27 void operator () (std_ostream
&) const;
30 typedef struct Foo
{} Foo
;
32 inline std_ostream
& operator << (std_ostream
&, const Streamer
<Foo
>&);
34 std_ostream
& operator << (std_ostream
& o
, const Streamer
<Foo
>&) // expected-note{{is here}}
36 // Sema should flag this as a redefinition
42 void Streamer
<Foo
>::operator () (std_ostream
& o
) const // expected-note{{requested here}}