[all-commits] [llvm/llvm-project] a29f8d: [C++20][Modules][8/8] Amend module visibility rule...

iains via All-commits all-commits at lists.llvm.org
Tue Mar 1 00:29:33 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a29f8dbb7f3e816344a7be75996eea3ab5a0b5a3
      https://github.com/llvm/llvm-project/commit/a29f8dbb7f3e816344a7be75996eea3ab5a0b5a3
  Author: Iain Sandoe <iain at sandoe.co.uk>
  Date:   2022-03-01 (Tue, 01 Mar 2022)

  Changed paths:
    M clang/lib/Sema/SemaLookup.cpp
    M clang/test/Modules/cxx20-10-1-ex2.cpp

  Log Message:
  -----------
  [C++20][Modules][8/8] Amend module visibility rules for partitions.

Implementation partitions bring two extra cases where we have
visibility of module-private data.

1) When we import a module implementation partition.
2) When a partition implementation imports the primary module intertace.

We maintain a record of direct imports into the current module since
partition decls from direct imports (but not trasitive ones) are visible.

The rules on decl-reachability are much more relaxed (with the standard
giving permission for an implementation to load dependent modules and for
the decls there to be reachable, but not visible).

Differential Revision: https://reviews.llvm.org/D118599




More information about the All-commits mailing list