1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
2 // RUN: %clang_cc1 -S -triple %itanium_abi_triple -std=c++11 -emit-llvm %s -o - | FileCheck %s
3 // expected-no-diagnostics
6 template<typename T
> class C
;
8 template<typename S
, typename R
= S
> C
<R
> operator - (C
<S
> m0
, C
<S
> m1
);
9 template<typename T
> class C
{
11 template<typename S
, typename R
> friend C
<R
> operator - (C
<S
> m0
, C
<S
> m1
);
14 template<typename S
, typename R
> inline C
<R
> operator - (C
<S
> m0
, C
<S
> m1
) {
20 int PR10856_main(int argc
, char** argv
) {
21 using namespace PR10856
;
27 // PR10856::C<int> PR10856::operator-<int, int>(PR10856::C<int>, PR10856::C<int>)
28 // CHECK: define {{.*}} @_ZN7PR10856miIiiEENS_1CIT0_EENS1_IT_EES5_
30 namespace PR10856_Root
{
31 template<typename Value
, typename Defaulted
= void>
34 template<typename ClassValue
> class MyClass
{
36 template<typename Value
, typename Defaulted
>
37 friend bool g(Value value
);
41 namespace PR10856_Root
{
48 // bool PR10856_Root::g<PR10856_Root::MyClass<int>, void>(PR10856_Root::MyClass<int>)
49 // CHECK: call {{.*}} @_ZN12PR10856_Root1gINS_7MyClassIiEEvEEbT_
52 template<typename T
> struct X
{
53 friend void f() = delete;