================
@@ -0,0 +1,19 @@
+// RUN: not %clang_cc1 -std=c++23 -fsyntax-only %s 2>&1 | FileCheck %s
+// Regression test: don't crash when an expression requirement becomes a
+// substitution failure during template instantiation (see #176402).
+
+void f() {
+    auto recursiveLambda = [](auto self, int depth) -> void {
+        struct MyClass;
+        auto testConcept = []<typename T> {
+            return requires(T) { &MyClass::operator0 }
+        };
+    };
+    recursiveLambda(recursiveLambda, 5);
+}
+
+// CHECK: error:
----------------
zyn0217 wrote:

we use -check instead of FileCheck.

See any tests in the same directory for examples.


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

Reply via email to