[all-commits] [llvm/llvm-project] d3df2a: [C++20] [Modules] Handle transitive import in the ...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Tue Mar 5 23:48:21 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d3df2a834cf6febb44c699d109b9e7f622194837
      https://github.com/llvm/llvm-project/commit/d3df2a834cf6febb44c699d109b9e7f622194837
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2024-03-06 (Wed, 06 Mar 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/Module.h
    M clang/lib/Basic/Module.cpp
    M clang/lib/Sema/SemaModule.cpp
    A clang/test/Modules/transitive-import.cppm

  Log Message:
  -----------
  [C++20] [Modules] Handle transitive import in the module properly

Close https://github.com/llvm/llvm-project/issues/84002

Per [module.import]p7:

> Additionally, when a module-import-declaration in a module unit of
> some module M imports another module unit U of M, it also imports all
> translation units imported by non-exported module-import-declarations
> in the module unit purview of U.

However, we only tried to implement it during the implicit import of
primary module interface for module implementation unit.

Also we didn't implement the last sentence from [module.import]p7
completely:

> These rules can in turn lead to the importation of yet more
> translation units.

This patch tries to care the both issues.



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