[PATCH] D117295: [clang][sema] Allow unnamed decls in C++20 module export{} blocks
Chuanqi Xu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 25 03:04:06 PST 2022
ChuanqiXu added inline comments.
================
Comment at: clang/lib/Sema/SemaModule.cpp:650-652
+ if (S.getLangOpts().CPlusPlus2b) {
+ if (BlockStart.isInvalid())
+ diagExportedUnnamedDecl(S, *UDK, D, BlockStart);
----------------
Should we add a cite to P1766R1 here?
================
Comment at: clang/test/CXX/module/module.interface/p3.cpp:12-16
-export { // expected-note 3{{export block begins here}}
- ; // expected-error {{ISO C++20 does not permit an empty declaration to appear in an export block}}
- static_assert(true); // expected-error {{ISO C++20 does not permit a static_assert declaration to appear in an export block}}
- using namespace A; // expected-error {{ISO C++20 does not permit using directive to be exported}}
-}
----------------
This one should be deleted unintentionally.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117295/new/
https://reviews.llvm.org/D117295
More information about the cfe-commits
mailing list