[PATCH] D147070: Improve requirement clause limitation on non templated function

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 28 11:55:27 PDT 2023


erichkeane added inline comments.


================
Comment at: clang/lib/Sema/SemaDecl.cpp:11886-11887
+      // - an enumerator for an enumeration that is a templated entity, or
+      // - the closure type of a lambda-expression ([expr.prim.lambda.closure])
+      // appearing in the declaration of a templated entity. [Note 6: A local
+      // class, a local or block variable, or a friend function defined in a
----------------
cor3ntin wrote:
> I think we have no test for this case, might be worth adding.
Interestingly, we permit that, but do NOT diagnose the lambda with a requires clause in a non-template function.  Hrm....


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

https://reviews.llvm.org/D147070



More information about the cfe-commits mailing list