[PATCH] D127187: [C++20] [Modules] Implement AllAdditionalTUReachable

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 7 01:02:15 PDT 2022


ChuanqiXu created this revision.
ChuanqiXu added reviewers: iains, rsmith, clang-language-wg.
ChuanqiXu added a project: clang-language-wg.
Herald added a project: All.
ChuanqiXu requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.
Herald added a project: clang.

[module.reach]p2 gives vendors freedom to decide whether or not additional TU is reachable:

> All translation units that are necessarily reachable are reachable. Additional translation units on which the point within the program has an interface dependency may be considered reachable, but it is unspecified which are and under what circumstances.

And @rsmith suggested:

> The default should probably be that we enforce reachability as strictly as we can, for portability and to help users enforce an "import what you use" hygiene rule, but in any case, we should give users the choice.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127187

Files:
  clang/include/clang/Basic/LangOptions.def
  clang/include/clang/Driver/Options.td
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Sema/SemaLookup.cpp
  clang/test/CXX/module/module.reach/ex1.cpp
  clang/test/CXX/module/module.reach/p2.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127187.434719.patch
Type: text/x-patch
Size: 4984 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220607/fd097824/attachment.bin>


More information about the cfe-commits mailing list