[PATCH] D148802: [Sema] Lambdas are not part of immediate context for deduction

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 20 07:46:48 PDT 2023


ilya-biryukov added inline comments.


================
Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:965
+    case CodeSynthesisContext::LambdaExpressionSubstitution:
+      // FIXME: add a note for lambdas.
       break;
----------------
erichkeane wrote:
> Would really like this note here, it shouldn't be too difficult, right? 
Ah, sorry, I added a comment here that I forgot to submit. The question is: could it be that we want to skip this note?

I wanted to double-check if folks find this note useful.
On one hand, this probably creates some noise as there will always be other notes that point into the location of a corresponding substitution location that contains the lambda.
On the other hand, since the lambda is not an immediate context, this may give hints to users on why SFINAE does not apply.

If you feel like the note is useful, I will follow up with an implementation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148802



More information about the cfe-commits mailing list