brintos

brintos / llvm-project-archived public Read only

0
0
Text · 705 B · 6702647 Raw
23 lines · cpp
1// RUN: %clang_cc1 -triple %ms_abi_triple -fms-extensions -emit-llvm -O0 -o - %s | FileCheck %s2 3// Friend functions defined in classes are emitted.4// CHECK: define weak_odr dso_local dllexport void @"?friend1@@YAXXZ"()5struct FuncFriend1 {6  friend __declspec(dllexport) void friend1() {}7};8 9// But function templates and functions defined in class templates are not10// emitted.11// CHECK-NOT: friend212// CHECK-NOT: friend313// CHECK-NOT: friend414struct FuncFriend2 {15  template<typename> friend __declspec(dllexport) void friend2() {}16};17template<typename> struct FuncFriend3 {18  friend __declspec(dllexport) void friend3() {}19  struct Inner {20    friend __declspec(dllexport) void friend4() {}21  };22};23