[PATCH] D139988: [clang][DebugInfo] Re-use clang::TemplateUtils to determine guide DW_AT_default_value for template parameters

Michael Buch via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 15 14:06:52 PST 2022


Michael137 added a comment.

In D139988#3999115 <https://reviews.llvm.org/D139988#3999115>, @dblaikie wrote:

> Looks good to me, thanks!
>
> Patch description might need a tweak, this bit:
>
>> Type template parameters where the type is itself a template instantiation (e.g., `template<typename T = Foo<T>>`)
>
> The quoted example is impossible (infinitely recursive) & the description might be less specific than necessary - is any template instantiation a problem (eg: `template<typename T = Foo<int>`) for the existing code/addressed by this patch, or only defaults that are instantiated with a prior template parameter in the same template parameter list? If it's the latter, would be good to include that nuance, if it's the former might be worth clarifying that/using some `Foo<int>` in the example insetad of `Foo<T>`

Whoops good catch. What I meant to say is `template<typename T1, typename T2 = Foo<T1>>`. Will update the commit message


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139988/new/

https://reviews.llvm.org/D139988



More information about the cfe-commits mailing list