[all-commits] [llvm/llvm-project] 0e7b30: [C++20] [Modules] Enhance better diagnostic for im...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Thu Nov 9 18:58:50 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0e7b30fa821dd4899227aa643030f4e4164f4e56
      https://github.com/llvm/llvm-project/commit/0e7b30fa821dd4899227aa643030f4e4164f4e56
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2023-11-10 (Fri, 10 Nov 2023)

  Changed paths:
    M clang/lib/Sema/SemaLookup.cpp
    M clang/test/CXX/module/module.import/p2.cpp
    M clang/test/CXX/module/module.reach/ex1.cpp
    M clang/test/CXX/module/module.reach/p2.cpp
    M clang/test/Modules/export-language-linkage.cppm

  Log Message:
  -----------
  [C++20] [Modules] Enhance better diagnostic for implicit global module and module partitions

Due to an oversight, when users use an unexported declaration from
implicit global module, the diagnostic will show "please #include"
instead of "please import". This patch corrects the behavior.

Also previously, when users use an unexported declarations from module
partitions, the diagnostic message will always show the partition name
no matter if that partition name is visible to the users. Now the users
may only see the partition name if the users are in the same module with
the partition unit.




More information about the All-commits mailing list