[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)
Michael Jabbour via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 26 11:19:05 PST 2025
michael-jabbour-sonarsource wrote:
@vsapsai Thank you for sharing the previous patch. This is really interesting.
> For the record, the previous work I've abandoned is https://reviews.llvm.org/D114833 Doesn't seem particularly relevant to this change to be honest.
As far as I can see, it actually seems to introduce the exact same `IdResolver.RemoveDecl(ECD)` call in `Sema::ActOnDuplicateDefinition` that I am introducing in this PR, and this seems to be sufficient to fix the crash here as well.
I tried to understand why that work was abandoned, in order to know if the reasoning applies to the changes in my PR.
- Regarding the "ambiguous use of internal linkage declaration" warning in the C++ test ([this comment](https://reviews.llvm.org/D114833#3165889)), I could see that the currently the warning is emitted before and after my PR on that test, so I see no risk here.
- About handling anonymous enums ([this comment](https://reviews.llvm.org/D114833#3190487)), do you think any further action needs to be taken? I have a test case to show how their AST dump looks like...
https://github.com/llvm/llvm-project/pull/114240
More information about the cfe-commits
mailing list