[PATCH] D152946: [C++20][Modules] Implement P2615R1 revised export diagnostics.

Iain Sandoe via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 14 12:31:14 PDT 2023


iains created this revision.
Herald added a subscriber: ChuanqiXu.
Herald added a project: All.
iains added a reviewer: ChuanqiXu.
iains added a subscriber: clang-modules.
iains edited the summary of this revision.
iains published this revision for review.
iains added a comment.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

thanks to Daniela Engert for reporting this and helping identify the current WG21 status on the topic.


It has been reported that the current clang  errors for, specifically,
static_assert in export contexts are a serious blocker to adoption of
modules in some cases.

There is also implementation divergence with GCC and MSVC allowing the
constructs mentioned below where clang currently rejects them with an
error.

The category of errors [for declarations in an exported context] is:
(unnamed, static_assert, empty and asm decls). These are now permitted
after P2615R1 which was approved by WG21 as a DR (and thus should be
applied to C++20 as well).

This patch removes these diagnostics and amends the testsuite accordingly.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152946

Files:
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/Sema/SemaModule.cpp
  clang/test/CXX/module/module.interface/p3.cpp
  clang/test/Modules/cxx20-10-2-ex1.cpp
  clang/test/Modules/cxx20-10-2-ex7.cpp
  clang/test/SemaCXX/modules.cppm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152946.531455.patch
Type: text/x-patch
Size: 13797 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230614/c89d86d9/attachment.bin>


More information about the cfe-commits mailing list