https://github.com/kazutakahirata created 
https://github.com/llvm/llvm-project/pull/143226

We don't need lambdas here.


>From e1f04dddd7717a0b39911ec5a9d698bc6bed8e56 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <k...@google.com>
Date: Fri, 6 Jun 2025 09:12:42 -0700
Subject: [PATCH] [clang] Strip away lambdas (NFC)

We don't need lambdas here.
---
 clang/lib/CodeGen/CGCall.cpp | 5 ++---
 clang/lib/Sema/Sema.cpp      | 3 +--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 75df821ed536d..a06455d25b1ef 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -2371,9 +2371,8 @@ static bool canApplyNoFPClass(const ABIArgInfo &AI, 
QualType ParamType,
 
   if (llvm::StructType *ST = dyn_cast<llvm::StructType>(IRTy)) {
     return !IsReturn && AI.getCanBeFlattened() &&
-           llvm::all_of(ST->elements(), [](llvm::Type *Ty) {
-             return llvm::AttributeFuncs::isNoFPClassCompatibleType(Ty);
-           });
+           llvm::all_of(ST->elements(),
+                        llvm::AttributeFuncs::isNoFPClassCompatibleType);
   }
 
   return false;
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 370ade6dea7a1..9826abc0c3b40 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -1375,8 +1375,7 @@ void Sema::ActOnEndOfTranslationUnit() {
 
     CurrentModule->NamedModuleHasInit =
         DoesModNeedInit(CurrentModule) ||
-        llvm::any_of(CurrentModule->submodules(),
-                     [&](auto *SubM) { return DoesModNeedInit(SubM); });
+        llvm::any_of(CurrentModule->submodules(), DoesModNeedInit);
   }
 
   if (TUKind == TU_ClangModule) {

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to