[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)
Kerry McLaughlin via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 9 06:00:18 PDT 2024
kmclaughlin-arm wrote:
> Isn't this a bug in the mangler? I mean, it's better to print an error rather than silently miscompile, but this doesn't really solve the issue.
Hi @efriedma-quic,
The SME type attributes are not part of the name mangling. We figured an error message would be useful in general to avoid Clang generating incorrect code for this case and any future cases where the types don't match (but the mangled names are the same). I did start trying to fix this by adding some special name mangling for lambdas in particular which took the attributes into account, but doing this required some SME specific changes in the general mangling code which made us unsure whether this approach was desirable.
https://github.com/llvm/llvm-project/pull/107581
More information about the cfe-commits
mailing list