[PATCH] D130614: [C++20] [Modules] Merge same concept decls in global module fragment

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 26 22:46:41 PDT 2022


ChuanqiXu created this revision.
ChuanqiXu added a reviewer: ilya-biryukov.
ChuanqiXu added a project: clang.
Herald added a project: All.
ChuanqiXu requested review of this revision.
Herald added a subscriber: cfe-commits.

I found this one when I try to add a C++20 Modules example for D130585 <https://reviews.llvm.org/D130585>. Then I found there are something to improve:
(1) When the declaration is shadowed by using decls, we could try to find its targeted decl. This is fine since we would check Previous.isSingleResult() before we process anything.
(2) When we complain about the redefinition, we need to check for the existence of global module fragment. GMF is designed to make C++20 Named modules to be compatible with headers.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130614

Files:
  clang/lib/Sema/SemaTemplate.cpp
  clang/test/Modules/merge-concepts-in-GMF.cppm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130614.447935.patch
Type: text/x-patch
Size: 3327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220727/9a50bc31/attachment.bin>


More information about the cfe-commits mailing list