mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +01:00
Make more use of llvm STLExtras (#4668)
This is essentially the result of looking at `.begin()` uses. We also frequently do `std::shuffle`, but unfortunately STLExtras doesn't provide a wrapper for that.
This commit is contained in:
@@ -1070,10 +1070,9 @@ auto Parser::FinalizeParsedOptions() -> ErrorOr<Success> {
|
||||
// Sort the missing arguments by name to provide a stable and deterministic
|
||||
// error message. We know there can't be duplicate names because these came
|
||||
// from a may keyed on the name, so this provides a total ordering.
|
||||
std::sort(missing_options.begin(), missing_options.end(),
|
||||
[](const Arg* lhs, const Arg* rhs) {
|
||||
return lhs->info.name < rhs->info.name;
|
||||
});
|
||||
llvm::sort(missing_options, [](const Arg* lhs, const Arg* rhs) {
|
||||
return lhs->info.name < rhs->info.name;
|
||||
});
|
||||
|
||||
std::string error_str = "required options not provided: ";
|
||||
llvm::raw_string_ostream error(error_str);
|
||||
|
||||
Reference in New Issue
Block a user