llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/140309.diff


1 Files Affected:

- (modified) clang/lib/Basic/Diagnostic.cpp (+1-4) 


``````````diff
diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp
index 586273ab88bd3..a23ac7794d86c 100644
--- a/clang/lib/Basic/Diagnostic.cpp
+++ b/clang/lib/Basic/Diagnostic.cpp
@@ -535,10 +535,7 @@ void 
WarningsSpecialCaseList::processSections(DiagnosticsEngine &Diags) {
   // FIXME: We should make this configurable in the parser instead.
   // FIXME: C++20 can use std::erase_if(Sections, [](Section &sec) { return
   // sec.SectionStr == "*"; });
-  Sections.erase(
-      std::remove_if(Sections.begin(), Sections.end(),
-                     [](Section &sec) { return sec.SectionStr == "*"; }),
-      Sections.end());
+  llvm::erase_if(Sections, [](Section &sec) { return sec.SectionStr == "*"; });
   // Make sure we iterate sections by their line numbers.
   std::vector<std::pair<unsigned, const Section *>> LineAndSectionEntry;
   LineAndSectionEntry.reserve(Sections.size());

``````````

</details>


https://github.com/llvm/llvm-project/pull/140309
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to