Skip to content

Commit b10cd5e

Browse files
committed
add comments to tests
Created using spr 1.3.5-bogner
2 parents 93d8c9c + 6e857b4 commit b10cd5e

File tree

274 files changed

+3991
-1727
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+3991
-1727
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ AST_MATCHER_P(QualType, hasAnyType, std::vector<StringRef>, Names) {
3131
return false;
3232

3333
std::string Name = Node.getLocalUnqualifiedType().getAsString();
34-
return llvm::any_of(Names, [&Name](StringRef Ref) { return Ref == Name; });
34+
return llvm::is_contained(Names, Name);
3535
}
3636

3737
AST_MATCHER(FieldDecl, hasIntBitwidth) {

clang-tools-extra/clang-tidy/misc/ConfusableTable/BuildConfusableTable.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,9 @@ int main(int argc, char *argv[]) {
5757
llvm::sort(Entries);
5858

5959
unsigned LargestValue =
60-
std::max_element(Entries.begin(), Entries.end(),
61-
[](const auto &Entry0, const auto &Entry1) {
62-
return Entry0.second.size() < Entry1.second.size();
63-
})
64-
->second.size();
60+
llvm::max_element(Entries, [](const auto &Entry0, const auto &Entry1) {
61+
return Entry0.second.size() < Entry1.second.size();
62+
})->second.size();
6563

6664
std::error_code Ec;
6765
llvm::raw_fd_ostream Os(argv[2], Ec);

clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,10 @@ static void addPlaceholderArgs(const LambdaProperties &LP,
333333

334334
ArrayRef<BindArgument> Args = LP.BindArguments;
335335

336-
const auto *MaxPlaceholderIt =
337-
std::max_element(Args.begin(), Args.end(),
338-
[](const BindArgument &B1, const BindArgument &B2) {
339-
return B1.PlaceHolderIndex < B2.PlaceHolderIndex;
340-
});
336+
const auto *MaxPlaceholderIt = llvm::max_element(
337+
Args, [](const BindArgument &B1, const BindArgument &B2) {
338+
return B1.PlaceHolderIndex < B2.PlaceHolderIndex;
339+
});
341340

342341
// Placeholders (if present) have index 1 or greater.
343342
if (!PermissiveParameterList && (MaxPlaceholderIt == Args.end() ||

clang-tools-extra/clangd/CompileCommands.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ void CommandMangler::operator()(tooling::CompileCommand &Command,
315315

316316
// Check whether the flag exists in the command.
317317
auto HasExact = [&](llvm::StringRef Flag) {
318-
return llvm::any_of(Cmd, [&](llvm::StringRef Arg) { return Arg == Flag; });
318+
return llvm::is_contained(Cmd, Flag);
319319
};
320320

321321
// Check whether the flag appears in the command as a prefix.

0 commit comments

Comments
 (0)