[clang-tools-extra] Add new tool: clang-read-diagnostics (PR #118522)

via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 3 10:04:33 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff bee33b5291a28aec76e98c0da25349266c7b653c e045e2db7367a0168d6fd40eace481d2074e91af --extensions cpp -- clang-tools-extra/clang-read-diagnostics/ClangReadDiagnostics.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang-tools-extra/clang-read-diagnostics/ClangReadDiagnostics.cpp b/clang-tools-extra/clang-read-diagnostics/ClangReadDiagnostics.cpp
index e7ced459b2..8439318077 100644
--- a/clang-tools-extra/clang-read-diagnostics/ClangReadDiagnostics.cpp
+++ b/clang-tools-extra/clang-read-diagnostics/ClangReadDiagnostics.cpp
@@ -1,4 +1,5 @@
-//===---- ClangReadDiagnostics.cpp - clang-read-diagnostics tool -----------===//
+//===---- ClangReadDiagnostics.cpp - clang-read-diagnostics tool
+//-----------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -26,7 +27,8 @@ using namespace clang;
 using namespace clang::serialized_diags;
 using namespace llvm;
 
-static cl::list<std::string> InputFiles(cl::Sink, cl::desc("<input files...>"), cl::Required);
+static cl::list<std::string> InputFiles(cl::Sink, cl::desc("<input files...>"),
+                                        cl::Required);
 
 class BasicSerializedDiagnosticReader : public SerializedDiagnosticReader {
 public:
@@ -89,9 +91,11 @@ protected:
     return {};
   }
 
-  virtual std::error_code
-  visitDiagnosticRecord(unsigned Severity, const Location &Location,
-                        unsigned Category, unsigned Flag, StringRef Message) override {
+  virtual std::error_code visitDiagnosticRecord(unsigned Severity,
+                                                const Location &Location,
+                                                unsigned Category,
+                                                unsigned Flag,
+                                                StringRef Message) override {
     Diagnostics_.emplace_back(
         RawDiagnostic{Severity, Location, Category, Flag, Message});
     return {};

``````````

</details>


https://github.com/llvm/llvm-project/pull/118522


More information about the cfe-commits mailing list