llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

Identified with llvm-use-ranges.


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


1 Files Affected:

- (modified) clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp (+4-5) 


``````````diff
diff --git a/clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp 
b/clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp
index 6673f2f319c0e..aafd8d45537e3 100644
--- a/clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp
+++ b/clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp
@@ -202,11 +202,10 @@ SarifDiagnostics::createResult(const PathDiagnostic *Diag,
     // Find the HTML report that was generated for this issue, if one exists.
     PDFileEntry::ConsumerFiles *Files = FM->getFiles(*Diag);
     if (Files) {
-      auto HtmlFile =
-          std::find_if(Files->cbegin(), Files->cend(), [](auto &File) {
-            return File.first == HTML_DIAGNOSTICS_NAME;
-          });
-      if (HtmlFile != Files->cend()) {
+      auto HtmlFile = llvm::find_if(*Files, [](const auto &File) {
+        return File.first == HTML_DIAGNOSTICS_NAME;
+      });
+      if (HtmlFile != Files->end()) {
         SmallString<128> HtmlReportPath =
             llvm::sys::path::parent_path(OutputFile);
         llvm::sys::path::append(HtmlReportPath, HtmlFile->second);

``````````

</details>


https://github.com/llvm/llvm-project/pull/169237
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to