[PATCH] D145271: [MSVC compatibility][DLLEXPORT/DLLIMPORT] Allow dllexport/dllimport for local classes

Wolfgang Pieb via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 3 13:17:33 PST 2023


wolfgangp created this revision.
wolfgangp added reviewers: rnk, hans.
Herald added a project: All.
wolfgangp requested review of this revision.

This is intended to address issue 56068 <https://github.com/llvm/llvm-project/issues/56068>.

MSVC seems to allow dllexport/dllimport on local classes. It also allows local classes that derive from dllexported/dllimported template classes. The resulting classes get external linkage. The utility of this is questionable, but clang should do the same in Microsoft mode.


https://reviews.llvm.org/D145271

Files:
  clang/lib/AST/Decl.cpp
  clang/test/SemaCXX/dllexport.cpp
  clang/test/SemaCXX/dllimport.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145271.502206.patch
Type: text/x-patch
Size: 10411 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230303/1af691ad/attachment.bin>


More information about the llvm-commits mailing list