[llvm-branch-commits] [clang] release/22.x: [C++20] [Modules] Add VisiblePromoted module ownership kind (#189903) (PR #192885)

Aaron Ballman via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Apr 21 08:33:54 PDT 2026


================
@@ -1575,7 +1575,7 @@ void Sema::makeMergedDefinitionVisible(NamedDecl *ND) {
   if (auto *ED = dyn_cast<EnumDecl>(ND);
       ED && ED->isFromGlobalModule() && !ED->isScoped()) {
     for (auto *ECD : ED->enumerators()) {
-      ECD->setVisibleDespiteOwningModule();
+      ECD->setVisiblePromoted();
----------------
AaronBallman wrote:

This changes serialization behavior, doesn't it? This was previously setting the module ownership kind to `Visible` and is now setting it to `VisiblePromoted` so if you serialize in Clang 22.1.x and deserialize in 22.1.y you may get surprising module ownership behavior?

https://github.com/llvm/llvm-project/pull/192885


More information about the llvm-branch-commits mailing list