================
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++20 -verify %s
+
+struct S {};
+template <typename T> bar C; // expected-error {{unknown type name 'bar'}}
+
+template <typename U> auto foo() {
+  return []<typename T>(
+             T, bool b = requires { C<T>; }) {
+    static_assert(requires { requires C<U>; }); // expected-error {{static 
assertion failed due to requirement 'requires { requires <<error-expression>>; 
}'}}
+    return 0;
+  };
+}
+
+auto baz = foo<int>();
+int qux = baz(S{}); // expected-note {{in instantiation of function template 
specialization 'foo()::(lambda)::operator()<S>' requested here}}
----------------
zyn0217 wrote:

This needs a trailing blank line.

https://github.com/llvm/llvm-project/pull/213660
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to