[clang] Fix enum enumerator visibility loss when #include is between module imports (PR #188865)
MichaĆ Chojnowski via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 30 04:19:33 PDT 2026
michoecho wrote:
> > > Clang 22.1.1 (unpatched) also does not reject the redefinition. The patch does not cause a regression, and it is yet another bug.
> >
> >
> > @avikivity Are you sure? I didn't check that specific version, but both 22.1.0 and trunk diagnose the redefinition: https://godbolt.org/z/qPY7Ea3r5
>
> I'm not sure of anything. But [redef.zip](https://github.com/user-attachments/files/26346274/redef.zip) reproduces the bug on clang 21.1.1 (from Fedora rawhide).
Ah, my example was wrong because I didn't realize that reduced BMI became the default (when `-fmodule-output` is used, as opposed to `--precompile`) in clang 22.
In other words: yes, the redefinition is diagnosed in clang 21 but undiagnosed in (unpatched) clang >=22. Disregard my comments, then.
https://github.com/llvm/llvm-project/pull/188865
More information about the cfe-commits
mailing list