[MinGW] Reject explicit hidden visibility applied to dllexport and hidden/protected...
authorFangrui Song <i@maskray.me>
Mon, 12 Sep 2022 22:56:36 +0000 (15:56 -0700)
committerFangrui Song <i@maskray.me>
Mon, 12 Sep 2022 22:56:36 +0000 (15:56 -0700)
commit6f9c4851ab7c729812bc8f48b19de3f84a64f6f0
tree6ce853fcccd9038419a171d56e0802d8c5107fd9
parentd950172a4fd9ae66df6a2ad020b26a9cbcd9800b
[MinGW] Reject explicit hidden visibility applied to dllexport and hidden/protected applied to dllimport

Hidden visibility is incompatible with dllexport.
Hidden and protected visibilities are incompatible with dllimport.
(PlayStation uses dllexport protected.)

When an explicit visibility attribute applies on a dllexport/dllimport
declaration, report a Frontend error (Sema does not compute visibility).

Reviewed By: mstorsjo

Differential Revision: https://reviews.llvm.org/D133266
clang/include/clang/Basic/DiagnosticFrontendKinds.td
clang/lib/CodeGen/CodeGenModule.cpp
clang/test/CodeGenCXX/dllstorage-visibility.cpp