| 1 |
// RUN: %clang_cc1 -triple x86_64-win32 -fsyntax-only -fms-extensions -verify=win32,win32-pedantic %s -Wdllexport-explicit-instantiation |
| 2 |
// RUN: %clang_cc1 -triple x86_64-win32 -fsyntax-only -fms-extensions -verify=win32 %s -Wno-dllexport-explicit-instantiation |
| 3 |
// RUN: %clang_cc1 -triple x86_64-mingw32 -fsyntax-only -fms-extensions -verify=mingw,mingw-pedantic %s -Wdllexport-explicit-instantiation |
| 4 |
// RUN: %clang_cc1 -triple x86_64-mingw32 -fsyntax-only -fms-extensions -verify=mingw %s -Wno-dllexport-explicit-instantiation |
| 5 |
|
| 6 |
template <class> |
| 7 |
class S {}; |
| 8 |
|
| 9 |
extern template class __declspec(dllexport) S<short>; // win32-pedantic-warning {{explicit instantiation declaration should not be 'dllexport'}} \ |
| 10 |
win32-pedantic-note {{attribute is here}} |
| 11 |
template class __declspec(dllexport) S<short>; // mingw-pedantic-warning {{'dllexport' attribute ignored on explicit instantiation definition}} |
| 12 |
|
| 13 |
extern template class __declspec(dllexport) S<int>; // win32-pedantic-warning {{explicit instantiation declaration should not be 'dllexport'}} \ |
| 14 |
win32-pedantic-note {{attribute is here}} \ |
| 15 |
win32-note {{'dllexport' attribute on the declaration is ignored}} |
| 16 |
template class S<int>; // win32-warning {{explicit instantiation definition is not exported without 'dllexport'}} |
| 17 |
|
| 18 |
extern template class S<long>; // mingw-note {{'dllexport' attribute is missing on previous declaration}} |
| 19 |
template class __declspec(dllexport) S<long>; // mingw-warning {{'dllexport' attribute ignored on explicit instantiation definition}} |