[PATCH] D134874: [Concepts] Fix Concepts on generic lambda in a VarTemplateSpecDecl

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 3 12:28:57 PDT 2022


erichkeane added inline comments.


================
Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:255-258
+/// \param ForConstraintInstantiation when collecting arguments,
+/// ForConstraintInstantiation indicates we should continue looking when
+/// encountering a lambda generic call operator, and continue looking for
+/// arguments on an enclosing class template.
----------------
tahonermann wrote:
> More a question than a review comment: why is `ForConstraintInstantiation` needed? The behavior it enables seems to me like the behavior that would always be desired. When would template arguments for such enclosing templates not be wanted?
Apparently we DONT always want the full depth.  It is the intent to only get as far back as 'needed' in some cases, and ForConstraintInstantiation causes us to go 'all the way to the TU' as far as I can tell.  TBH, I'm not super clear on it.  I tried at one point just modifying it, and it broke a ton of tests.


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

https://reviews.llvm.org/D134874



More information about the cfe-commits mailing list