[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
Fri Apr 24 06:24:02 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:
Understood. I thought the problem several times. And my thought is, it will be VERY hard to achieve that. If we want it to be compatible between Clang 22.1.1 and Clang 22.1.2, it means we can't backport almost everything related to serialization. And also, there are users who will build clang from source. I don't think we should ignore them. So we need a mechanism working automatically.
Otherwise, we need a spec and make sure we're conforming. The cost may be too high. So my conclusion was (not is) the status quo is not perfect nor neat but acceptable if we consider everyone, including end users and developers.
https://github.com/llvm/llvm-project/pull/192885
More information about the llvm-branch-commits
mailing list