[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 11 07:41:37 PST 2024
================
@@ -168,3 +168,30 @@ auto lambda4 = [] requires(sizeof(char) == 1){}; // expected-error {{expected bo
#if __cplusplus <= 202002L
// expected-warning at -2{{lambda without a parameter clause is a C++23 extension}}
#endif
+
+namespace GH78524 {
+
+template <typename T> T Foo;
+
+template <typename T> auto C(Foo<T>);
+
+template <typename T> struct D {
+ decltype(T()(C<T>)) Type;
+};
+
+template <typename T, typename U> D<T> G(T, U) { return {}; }
+
+struct E {};
+
+void F() {
+ G([]<typename T>
+// ~~~~~~~~~~ T: 0,0
----------------
zyn0217 wrote:
Oh, I was going to detail the comment after putting up the PR, but for some reason I forgot it. Added.
https://github.com/llvm/llvm-project/pull/80656
More information about the cfe-commits
mailing list