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

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 5 07:44:35 PST 2024


================
@@ -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 that they aren't needed.

https://github.com/llvm/llvm-project/pull/78598


More information about the cfe-commits mailing list