Skip to content

Commit 6edfc6c

Browse files
[clang-tools-extra] Use llvm::any_of (NFC) (#143281)
1 parent 1cf1c21 commit 6edfc6c

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

clang-tools-extra/clang-doc/HTMLMustacheGenerator.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,8 @@ static json::Value extractValue(const EnumInfo &I,
364364
Object Obj = Object();
365365
std::string EnumType = I.Scoped ? "enum class " : "enum ";
366366
EnumType += I.Name;
367-
bool HasComment = std::any_of(
368-
I.Members.begin(), I.Members.end(),
369-
[](const EnumValueInfo &M) { return !M.Description.empty(); });
367+
bool HasComment = llvm::any_of(
368+
I.Members, [](const EnumValueInfo &M) { return !M.Description.empty(); });
370369
Obj.insert({"EnumName", EnumType});
371370
Obj.insert({"HasComment", HasComment});
372371
Obj.insert({"ID", toHex(toStringRef(I.USR))});

clang-tools-extra/clang-tidy/bugprone/ChainedComparisonCheck.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ AST_MATCHER(BinaryOperator,
3434

3535
AST_MATCHER(CXXOperatorCallExpr,
3636
hasCppOperatorAChildComparisonOperatorWithoutParen) {
37-
return std::any_of(Node.arg_begin(), Node.arg_end(),
38-
isExprAComparisonOperator);
37+
return llvm::any_of(Node.arguments(), isExprAComparisonOperator);
3938
}
4039

4140
struct ChainedComparisonData {

0 commit comments

Comments
 (0)