[clang] [DebugInfo] When referencing structured bindings use the reference's location, not the binding's declaration's location (PR #153637)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 14 17:32:02 PDT 2025


efriedma-quic wrote:

Really, the AST design is weird: we're not supposed to do any computation when you reference parts of the binding.  We represent it as an expression just to reduce the code required to handle bindings.  As such, the set of expressions actually allowed in a binding are quite limited.  So this might be sufficient.

But this at least deserves a comment in the code where we handle BindingDecl.  And testcases for all the forms of bindings (array, vector, member, complex, tuple).

https://github.com/llvm/llvm-project/pull/153637


More information about the cfe-commits mailing list