@@ -19706,22 +19706,29 @@ static void buildLambdaCaptureFixit(Sema &Sema,
LambdaScopeInfo *LSI,
}
}
+static DeclContext *ignoreReuquiresBodyDecl(DeclContext *DC) {
HerrCai0907 wrote:
I think inline it will be better since we only call it once.
https://git
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/78598
>From 8fa3dc43e770025308da47f6aff309fa58c47fc3 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Thu, 18 Jan 2024 23:12:23 +0800
Subject: [PATCH 1/4] [clang] reject to capture variable in
`RequiresExprBodyDe
@@ -0,0 +1,25 @@
+// RUN: %clang -fsyntax-only -std=c++20 -Xclang -verify %s
+
+// expected-no-diagnostics
+
+auto GH69307_Func_1() {
+ constexpr auto b = 1;
+ return [&](auto c) -> int
erichkeane wrote:
Can you do a similar test with NO capture here? To show