8000 [Basic] Use llvm::erase_if (NFC) (#140309) · llvm/llvm-project@dd4b69f · GitHub
[go: up one dir, main page]

Skip to content

Commit dd4b69f

Browse files
[Basic] Use llvm::erase_if (NFC) (#140309)
1 parent da944e0 commit dd4b69f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

clang/lib/Basic/Diagnostic.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -535,10 +535,7 @@ void WarningsSpecialCaseList::processSections(DiagnosticsEngine &Diags) {
535535
// FIXME: We should make this configurable in the parser instead.
536536
// FIXME: C++20 can use std::erase_if(Sections, [](Section &sec) { return
537537
// sec.SectionStr == "*"; });
538-
Sections.erase(
539-
std::remove_if(Sections.begin(), Sections.end(),
540-
[](Section &sec) { return sec.SectionStr == "*"; }),
541-
Sections.end());
538+
llvm::erase_if(Sections, [](Section &sec) { return sec.SectionStr == "*"; });
542539
// Make sure we iterate sections by their line numbers.
543540
std::vector<std::pair<unsigned, const Section *>> LineAndSectionEntry;
544541
LineAndSectionEntry.reserve(Sections.size());

0 commit comments

Comments
 (0)
0