Index: test/CodeGenCXX/instantiate-uuid.cpp =================================================================== --- /dev/null +++ test/CodeGenCXX/instantiate-uuid.cpp @@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -std=c++14 -fms-extensions -fms-compatibility -emit-llvm -o - %s | Filecheck %s + +// expected-no-diagnostics + +// M32-DAG: $"\01??4?$A@$E?_GUID_ddb47a6a_0f23_11d5_9109_00e0296b75d3@@3U__s_GUID@@B@@QEAAAEAV0@AEBV0@@Z" = comdat any + +typedef struct _GUID { + int i; +} IID; +template +class A {}; + +struct + __declspec(uuid("{DDB47A6A-0F23-11D5-9109-00E0296B75D3}")) + S1 {}; + +struct + __declspec(uuid("{DDB47A6A-0F23-11D5-9109-00E0296B75D3}")) + S2 {}; + +struct __declspec(dllexport) + C1 : public A<&__uuidof(S1)> {}; + +struct __declspec(dllexport) + C2 : public A<&__uuidof(S2)> {}; + +// CHECK-LABEL: define weak_odr dllexport dereferenceable(1) %class.A* @"\01??4?$A@$E?_GUID_ddb47a6a_0f23_11d5_9109_00e0296b75d3@@3U__s_GUID@@B@@QEAAAEAV0@AEBV0@@Z" + + Index: test/Sema/member-reference-dll.cpp =================================================================== --- test/Sema/member-reference-dll.cpp +++ /dev/null @@ -1,24 +0,0 @@ -// RUN: %clang_cc1 -triple x86_64-windows-msvc -fsyntax-only -verify -fms-extensions -fms-compatibility %s -// expected-no-diagnostics - -namespace test1 { -class __declspec(dllimport) Edge; - -template -class __declspec(dllimport) Range { - void insert(T *obj) { obj->loc(); } -}; - -template void Range::insert(Edge *); -} // namespace test1 - -namespace test2 { -class __declspec(dllexport) Edge; - -template -class __declspec(dllimport) Range { - void insert(T *obj) { obj->loc(); } -}; - -template void Range::insert(Edge *); -} // namespace test2