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

Chuanqi Xu via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Apr 23 18:56:34 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();
----------------
ChuanqiXu9 wrote:

> But it seems like poor QoI when Clang 22.1.1 cannot read a module produced by Clang 22.1.0, particularly because we go to such great efforts to ensure compatibility between dot releases.

Yeah, I thought about this too. But I gave up on improving this with simple change. As due to our current developing mode, I feel the plain fix (no check on commit number but the human filled version number) will be somehow dangerous as people may forget updating the correspond version number. And on the other hand, it is less annoying to apply strong strict check. The diagnostic message is clear.

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


More information about the llvm-branch-commits mailing list