[PATCH] D118586: [C++20][Modules] Initial handling for module partitions.

Iain Sandoe via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 15 08:30:36 PST 2022


iains created this revision.
iains updated this revision to Diff 405588.
iains added a comment.
iains updated this revision to Diff 405590.
iains updated this revision to Diff 408760.
iains updated this revision to Diff 408855.
iains added reviewers: rsmith, urnathan, ChuanqiXu.
iains published this revision for review.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

rebased onto the import state machine.


iains added a comment.

reapply rebase


iains added a comment.

Rebased onto other modules work.

Also had to bump DIAG_SIZE_PARSE, since the existing allocation was full.


iains added a comment.

update after fixing (most) lint suggestions.

The change to DiagnosticIDs.h is not going to be applicable - it would need the
whole file to be rewritten and that change is incidental to this patch series.


iains added a comment.

this is the third patch in an 8 patch series to implement basic module partition support.
The change to clang/include/clang/Basic/DiagnosticIDs.h is required for this to build (at present) but is otherwise incidental.


This implements the parsing and recognition of module partition CMIs
and removes the FIXMEs in the parser.

Module partitions are recognised in the base computation of visibility,
however additional amendments to visibility follow in subsequent patches.

Add initial testcases for partition handling, derived from the examples in
Section 10 of the C++20 standard, which identifies what should be accepted
and/or rejected.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118586

Files:
  clang/include/clang/AST/Decl.h
  clang/include/clang/Basic/DiagnosticIDs.h
  clang/include/clang/Basic/DiagnosticParseKinds.td
  clang/include/clang/Sema/Sema.h
  clang/lib/Parse/Parser.cpp
  clang/lib/Sema/SemaDecl.cpp
  clang/lib/Sema/SemaLookup.cpp
  clang/lib/Sema/SemaModule.cpp
  clang/test/CXX/module/module.unit/p3.cpp
  clang/test/CXX/module/module.unit/p8.cpp
  clang/test/Modules/cxx20-import-diagnostics-a.cpp
  clang/test/Modules/cxx20-partition-diagnostics-a.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118586.408855.patch
Type: text/x-patch
Size: 26540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220215/46006778/attachment-0001.bin>


More information about the cfe-commits mailing list