[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 17 12:50:38 PDT 2024
efriedma-quic wrote:
In the example in https://github.com/llvm/llvm-project/pull/107581#issuecomment-2343651051 , there are four relevant calls to GetOrCreateLLVMFunction: one for each function with IsInDefinition false, and one for each function with IsInDefinition true. The last of those calls triggers the diagnostic
For the lambda example, there are only three relevant calls to GetOrCreateLLVMFunction; one for each function with IsInDefinition false, but then only one with IsInDefinition true.
It's not clear to me why the two cases are different, and I don't really want to add lambda-specific check without knowing why lambdas are special here. Maybe the right condition to check is something else.
https://github.com/llvm/llvm-project/pull/107581
More information about the cfe-commits
mailing list