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

Tom Honermann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 3 12:48:34 PDT 2022


tahonermann 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.
----------------
erichkeane wrote:
> 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.
Ok, thanks. My guess is that implies bugs elsewhere but that isn't a concern for this change!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134874



More information about the cfe-commits mailing list