[all-commits] [llvm/llvm-project] 98348c: [C++20] [Modules] Add VisiblePromoted module owner...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Mon Apr 27 20:28:09 PDT 2026


  Branch: refs/heads/release/22.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 98348c38cf17d9c9f621cb6bf81c79f6edeca125
      https://github.com/llvm/llvm-project/commit/98348c38cf17d9c9f621cb6bf81c79f6edeca125
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2026-04-28 (Tue, 28 Apr 2026)

  Changed paths:
    M clang/include/clang/AST/DeclBase.h
    M clang/include/clang/AST/DeclContextInternals.h
    M clang/lib/AST/Decl.cpp
    M clang/lib/AST/DeclBase.cpp
    M clang/lib/Sema/SemaLookup.cpp
    M clang/lib/Serialization/ASTReaderDecl.cpp
    A clang/test/Modules/include-between-imports-enums.cppm

  Log Message:
  -----------
  [C++20] [Modules] Add VisiblePromoted module ownership kind (#189903)

This patch adds a new ModuleOwnershipKind::VisiblePromoted to handle
declarations that are not visible to the current TU but are promoted to
be visible to avoid re-parsing.

Originally we set the visible visiblity directly in such cases. But
https://github.com/llvm/llvm-project/issues/188853 shows such decls may
be excluded later if we import #include and then import. So we have to
introduce a new visibility to express the intention that the visibility
of the decl is intentionally promoted.

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

(cherry picked from commit c97e08e331736ae8c7d17bf1f24954570f564ad0)



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