Keep inherited dllimport/export attrs for explicit specialization of class template...
authorHans Wennborg <hans@chromium.org>
Sun, 18 Sep 2022 23:05:56 +0000 (01:05 +0200)
committerHans Wennborg <hans@chromium.org>
Fri, 7 Oct 2022 10:24:19 +0000 (12:24 +0200)
commitc9b771b9fc2f17cccd9ccbf8f1d52e2642679b8a
tree87a9453ab2a2c44f3d0caaecf0e128fc4b8b31dc
parente09aa0d192e0ae240c55aaf8205e8320d49f9bdb
Keep inherited dllimport/export attrs for explicit specialization of class template member functions

Previously we were stripping these normally inherited attributes during
explicit specialization. However for class template member functions
(but not function templates), MSVC keeps the attribute.

This makes Clang match that behavior, and fixes GitHub issue #54717

Differential revision: https://reviews.llvm.org/D135154
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaTemplate.cpp
clang/test/CodeGenCXX/dllexport-members.cpp
clang/test/CodeGenCXX/dllimport-members.cpp
clang/test/SemaCXX/dllexport.cpp
clang/test/SemaCXX/dllimport.cpp