[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
Wed Apr 22 05:12:30 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:
I feel there are some redundancy. When we write the module file, we will write the full version of the compiler: https://github.com/llvm/llvm-project/blob/b2f3532e9fb18cb51c6ea87a2de0595baef85f33/clang/lib/Serialization/ASTWriter.cpp#L1467-L1479 and when we read it, we will check it: https://github.com/llvm/llvm-project/blob/b2f3532e9fb18cb51c6ea87a2de0595baef85f33/clang/lib/Serialization/ASTReader.cpp#L3437-L3444
So literally, we can't read a module produced from a different version number.
https://github.com/llvm/llvm-project/pull/192885
More information about the llvm-branch-commits
mailing list