forked from OSchip/llvm-project
Use llvm::any_of (NFC)
This commit is contained in:
parent
d11103f9a0
commit
71336d03f1
|
@ -411,10 +411,10 @@ bool MakeSmartPtrCheck::replaceNew(DiagnosticBuilder &Diag,
|
|||
// stop generating fixes -- as the C++ rule is complicated and we are less
|
||||
// certain about the correct fixes.
|
||||
if (const CXXRecordDecl *RD = New->getType()->getPointeeCXXRecordDecl()) {
|
||||
if (llvm::find_if(RD->ctors(), [](const CXXConstructorDecl *Ctor) {
|
||||
if (llvm::any_of(RD->ctors(), [](const CXXConstructorDecl *Ctor) {
|
||||
return Ctor->isCopyOrMoveConstructor() &&
|
||||
(Ctor->isDeleted() || Ctor->getAccess() == AS_private);
|
||||
}) != RD->ctor_end()) {
|
||||
})) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -807,9 +807,8 @@ private:
|
|||
// Skip functions with less parameters, they can't be the target.
|
||||
if (Callee->parameters().size() < Parameters.size())
|
||||
return;
|
||||
if (std::any_of(Args.begin(), Args.end(), [](const Expr *E) {
|
||||
return dyn_cast<PackExpansionExpr>(E) != nullptr;
|
||||
})) {
|
||||
if (llvm::any_of(Args,
|
||||
[](const Expr *E) { return isa<PackExpansionExpr>(E); })) {
|
||||
return;
|
||||
}
|
||||
auto PackLocation = findPack(Args);
|
||||
|
|
|
@ -515,10 +515,9 @@ bool FormatTokenLexer::tryMergeTokens(size_t Count, TokenType NewType) {
|
|||
|
||||
bool FormatTokenLexer::tryMergeTokensAny(
|
||||
ArrayRef<ArrayRef<tok::TokenKind>> Kinds, TokenType NewType) {
|
||||
return std::any_of(Kinds.begin(), Kinds.end(),
|
||||
[this, NewType](ArrayRef<tok::TokenKind> Kinds) {
|
||||
return tryMergeTokens(Kinds, NewType);
|
||||
});
|
||||
return llvm::any_of(Kinds, [this, NewType](ArrayRef<tok::TokenKind> Kinds) {
|
||||
return tryMergeTokens(Kinds, NewType);
|
||||
});
|
||||
}
|
||||
|
||||
// Returns \c true if \p Tok can only be followed by an operand in JavaScript.
|
||||
|
|
Loading…
Reference in New Issue