[MSCV][dllexport/dllimport][PS] Allow UniqueExternal linkage classes with dllexport...
authorWolfgang Pieb <wolfgang.pieb@sony.com>
Mon, 13 Mar 2023 17:45:20 +0000 (17:45 +0000)
committerWolfgang Pieb <wolfgang.pieb@sony.com>
Wed, 29 Mar 2023 18:15:04 +0000 (18:15 +0000)
commit477f9cea77e6d55ecddaafbedccd418750c40dbd
tree65213a88d7c27cced9da371107898f2b31e9aa32
parentda9f890d09e78614da86ce2a14e2e92786038497
[MSCV][dllexport/dllimport][PS] Allow UniqueExternal linkage classes with dllexport/dllimport

MSVC allows instantiations of exported or imported template classes with template
parameters that have internal linkage. Clang now allows it in Microsoft mode and for
the Playstation platform. This partially addresses issue 56068.

Note that MSVC also allows explicit dllexport/dllimport attributes on classes
with internal linkage (e.g. local classes or classes declared in anonymous name spaces).
Clang continues to reject such declarations.

Reviewed By: hans

Differential Revision: https://reviews.llvm.org/D146338
clang/lib/Sema/SemaDeclCXX.cpp
clang/test/CodeGenCXX/dllexport-unique-external.cpp [new file with mode: 0644]
clang/test/CodeGenCXX/dllimport-unique-external.cpp [new file with mode: 0644]
clang/test/SemaCXX/dllexport.cpp
clang/test/SemaCXX/dllimport.cpp