[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585, #111173)" (PR #111852)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 14 07:17:13 PDT 2024


ilya-biryukov wrote:

Could you dive a little deeper why this change is necessary? E.g. does the most recent redecl have some properties that the canonical declaration (which would be the first one) does not?

Also, how do we emulate the old behavior in places that are needed? E.g. in the example above, the code prefers the first redeclaration as a heuristic to find the public declaration instead of the (implementation detail) definition that usually follows later. It's slightly surprising that the call to `func = func->getCanonicalDecl();` does not end up with the first redeclaration.
Do you have an idea why that happens and what could be done to restore the old behavior?

I understand that Clang APIs are not stable, but we would need some migration path for our tools.

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


More information about the cfe-commits mailing list