[all-commits] [llvm/llvm-project] 82034a: [C++20] [Modules] Warn for importing implementatio...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Fri Sep 13 23:46:11 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 82034aca30ad8b08aadfe6b6b9048f5cdfa1d3ff
      https://github.com/llvm/llvm-project/commit/82034aca30ad8b08aadfe6b6b9048f5cdfa1d3ff
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2024-09-14 (Sat, 14 Sep 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaModule.cpp
    M clang/test/CXX/module/module.import/p2.cpp
    M clang/test/Modules/cxx20-10-3-ex1.cpp

  Log Message:
  -----------
  [C++20] [Modules] Warn for importing implementation partition unit in interface units (#108493)

Recently, there are multiple false positive issue reports about the
reachability of implementation partition units:
- https://github.com/llvm/llvm-project/issues/105882
- https://github.com/llvm/llvm-project/issues/101348
- https://lists.isocpp.org/core/2024/08/16232.php

And according to our use experience for modules, we find it is a pretty
good practice to not import implementation partition units in the
interface units. It can help developers to have a pretty good mental
model for when to use an implementation partition unit: that any unit in
the module but not in the module interfaces can be in the implementation
partition unit.

So I think it is good to add the diagnostics.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list