[OpenACC] Enable 'attach' clause for combined constructs
[llvm-project.git] / clang / test / CodeGenCXX / dllexport-ms-friend.cpp
blob670264704e8915e1970cabd639654c04f17ff977
1 // RUN: %clang_cc1 -triple %ms_abi_triple -fms-extensions -emit-llvm -O0 -o - %s | FileCheck %s
3 // Friend functions defined in classes are emitted.
4 // CHECK: define weak_odr dso_local dllexport void @"?friend1@@YAXXZ"()
5 struct FuncFriend1 {
6 friend __declspec(dllexport) void friend1() {}
7 };
9 // But function templates and functions defined in class templates are not
10 // emitted.
11 // CHECK-NOT: friend2
12 // CHECK-NOT: friend3
13 // CHECK-NOT: friend4
14 struct FuncFriend2 {
15 template<typename> friend __declspec(dllexport) void friend2() {}
17 template<typename> struct FuncFriend3 {
18 friend __declspec(dllexport) void friend3() {}
19 struct Inner {
20 friend __declspec(dllexport) void friend4() {}