[clang] [clang] Strip away lambdas (NFC) (PR #143226)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 6 18:44:58 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-codegen
@llvm/pr-subscribers-clang
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
We don't need lambdas here.
---
Full diff: https://github.com/llvm/llvm-project/pull/143226.diff
2 Files Affected:
- (modified) clang/lib/CodeGen/CGCall.cpp (+2-3)
- (modified) clang/lib/Sema/Sema.cpp (+1-2)
``````````diff
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) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/143226
More information about the cfe-commits
mailing list