[clang] 4e310d8 - [clang] Strip redundant lambda (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 17 20:55:26 PST 2021
Author: Kazu Hirata
Date: 2021-12-17T20:55:10-08:00
New Revision: 4e310d89f22303873c952a9ca5ca91c921407336
URL: https://github.com/llvm/llvm-project/commit/4e310d89f22303873c952a9ca5ca91c921407336
DIFF: https://github.com/llvm/llvm-project/commit/4e310d89f22303873c952a9ca5ca91c921407336.diff
LOG: [clang] Strip redundant lambda (NFC)
Added:
Modified:
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Sema/SemaOpenMP.cpp
Removed:
################################################################################
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 5d795bfd37ae7..106da642f3619 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -770,9 +770,7 @@ static void parseAnalyzerConfigs(AnalyzerOptions &AnOpts,
static void getAllNoBuiltinFuncValues(ArgList &Args,
std::vector<std::string> &Funcs) {
std::vector<std::string> Values = Args.getAllArgValues(OPT_fno_builtin_);
- auto BuiltinEnd = llvm::partition(Values, [](const std::string FuncName) {
- return Builtin::Context::isBuiltinFunc(FuncName);
- });
+ auto BuiltinEnd = llvm::partition(Values, Builtin::Context::isBuiltinFunc);
Funcs.insert(Funcs.end(), Values.begin(), BuiltinEnd);
}
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 4afbf62580085..5ecfe7fca55cb 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -2306,9 +2306,7 @@ void Sema::startOpenMPCXXRangeFor() {
OpenMPClauseKind Sema::isOpenMPPrivateDecl(ValueDecl *D, unsigned Level,
unsigned CapLevel) const {
assert(LangOpts.OpenMP && "OpenMP is not allowed");
- if (DSAStack->hasExplicitDirective(
- [](OpenMPDirectiveKind K) { return isOpenMPTaskingDirective(K); },
- Level)) {
+ if (DSAStack->hasExplicitDirective(isOpenMPTaskingDirective, Level)) {
bool IsTriviallyCopyable =
D->getType().getNonReferenceType().isTriviallyCopyableType(Context) &&
!D->getType()
More information about the cfe-commits
mailing list