[clang] [llvm] [clang-tools-extra] [clang] reject to capture variable in `RequiresExprBodyDecl` (PR #78598)

2024-02-06 Thread Congcong Cai via cfe-commits
@@ -19706,22 +19706,29 @@ static void buildLambdaCaptureFixit(Sema , LambdaScopeInfo *LSI, } } +static DeclContext *ignoreReuquiresBodyDecl(DeclContext *DC) { HerrCai0907 wrote: I think inline it will be better since we only call it once.

[clang] [llvm] [clang-tools-extra] [clang] reject to capture variable in `RequiresExprBodyDecl` (PR #78598)

2024-02-06 Thread Congcong Cai via cfe-commits
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

[clang] [llvm] [clang-tools-extra] [clang] reject to capture variable in `RequiresExprBodyDecl` (PR #78598)

2024-02-05 Thread Erich Keane via cfe-commits
@@ -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