[clang] 0ef1e69 - [clang] Strip away lambdas (NFC) (#143226)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 6 22:55:30 PDT 2025


Author: Kazu Hirata
Date: 2025-06-06T22:55:26-07:00
New Revision: 0ef1e69f224086e105ddaeebf2f90e7658a2fe93

URL: https://github.com/llvm/llvm-project/commit/0ef1e69f224086e105ddaeebf2f90e7658a2fe93
DIFF: https://github.com/llvm/llvm-project/commit/0ef1e69f224086e105ddaeebf2f90e7658a2fe93.diff

LOG: [clang] Strip away lambdas (NFC) (#143226)

We don't need lambdas here.

Added: 
    

Modified: 
    clang/lib/CodeGen/CGCall.cpp
    clang/lib/Sema/Sema.cpp

Removed: 
    


################################################################################
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) {


        


More information about the cfe-commits mailing list