[all-commits] [llvm/llvm-project] 477f9c: [MSCV][dllexport/dllimport][PS] Allow UniqueExtern...

Wolfgang Pieb via All-commits all-commits at lists.llvm.org
Wed Mar 29 11:15:38 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 477f9cea77e6d55ecddaafbedccd418750c40dbd
  Author: Wolfgang Pieb <wolfgang.pieb at sony.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M clang/lib/Sema/SemaDeclCXX.cpp
    A clang/test/CodeGenCXX/dllexport-unique-external.cpp
    A clang/test/CodeGenCXX/dllimport-unique-external.cpp
    M clang/test/SemaCXX/dllexport.cpp
    M clang/test/SemaCXX/dllimport.cpp

  Log Message:
  [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

More information about the All-commits mailing list