// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s // RUN: %clang_cc1 -S -triple %itanium_abi_triple -std=c++11 -emit-llvm %s -o - | FileCheck %s // expected-no-diagnostics namespace PR10856 { template class C; template C operator - (C m0, C m1); template class C { public: template friend C operator - (C m0, C m1); }; template inline C operator - (C m0, C m1) { C ret; return ret; } }; int PR10856_main(int argc, char** argv) { using namespace PR10856; C a; a-a; return 0; } // PR10856::C PR10856::operator-(PR10856::C, PR10856::C) // CHECK: define {{.*}} @_ZN7PR10856miIiiEENS_1CIT0_EENS1_IT_EES5_ namespace PR10856_Root { template bool g(Value value); template class MyClass { private: template friend bool g(Value value); }; } namespace PR10856_Root { void f() { MyClass value; g(value); } } // bool PR10856_Root::g, void>(PR10856_Root::MyClass) // CHECK: call {{.*}} @_ZN12PR10856_Root1gINS_7MyClassIiEEvEEbT_ namespace PR43400 { template struct X { friend void f() = delete; }; X xi; }