diff options
| author | Hans Wennborg <hans@hanshq.net> | 2015-04-22 04:05:17 +0000 |
|---|---|---|
| committer | Hans Wennborg <hans@hanshq.net> | 2015-04-22 04:05:17 +0000 |
| commit | 287231cb7a89ed7da152aef3ea86f893b62f6e59 (patch) | |
| tree | 8898b4f88d1d55567e88fbc197fae624122cc3ff /clang/test/SemaCXX | |
| parent | 38267349ee0b9cee9e00398ede647f60841b49ff (diff) | |
| download | bcm5719-llvm-287231cb7a89ed7da152aef3ea86f893b62f6e59.tar.gz bcm5719-llvm-287231cb7a89ed7da152aef3ea86f893b62f6e59.zip | |
Don't dllimport/export class members with internal linkage (PR23308)
For example, a function taking a parameter with internal linkage will
itself have internal linkage since it cannot be called outside the
translation unit.
Differential Revision: http://reviews.llvm.org/D9182
llvm-svn: 235471
Diffstat (limited to 'clang/test/SemaCXX')
| -rw-r--r-- | clang/test/SemaCXX/dllexport.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/dllexport.cpp b/clang/test/SemaCXX/dllexport.cpp index 3bb9d224f72..3b9b20d72de 100644 --- a/clang/test/SemaCXX/dllexport.cpp +++ b/clang/test/SemaCXX/dllexport.cpp @@ -393,6 +393,12 @@ extern template struct __declspec(dllexport) ExplicitInstantiationDeclTemplate<i template <typename T> struct __declspec(dllexport) ExplicitInstantiationDeclExportedTemplate {}; // expected-note{{attribute is here}} extern template struct ExplicitInstantiationDeclExportedTemplate<int>; // expected-warning{{explicit instantiation declaration should not be 'dllexport'}} +namespace { struct InternalLinkageType {}; } +struct __declspec(dllexport) PR23308 { + void f(InternalLinkageType*); +}; +void PR23308::f(InternalLinkageType*) {} // No error; we don't try to export f because it has internal linkage. + //===----------------------------------------------------------------------===// // Classes with template base classes //===----------------------------------------------------------------------===// |

