[clang] [Clang] [NFC] Add "human" diagnostic argument format (PR #115835)

via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 12 01:24:54 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 89aaf2cf68d00e86dfd102a449fc68ff7ea5c85c ccf18e49f884b4430dff70d59fb3236259661f9d --extensions cpp -- clang/lib/Basic/Diagnostic.cpp clang/lib/Basic/SourceManager.cpp clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp
index 9a3f2aec5d..acd8c00162 100644
--- a/clang/lib/Basic/Diagnostic.cpp
+++ b/clang/lib/Basic/Diagnostic.cpp
@@ -670,7 +670,7 @@ static void HandleIntegerHumanModifier(unsigned ValNo,
   for (const auto &[UnitSize, UnitSign] : Units) {
     if (ValNo >= UnitSize) {
       // Out << llvm::formatv("{0:F}{1}", ValNo / static_cast<double>(UnitSize),
-                          //  UnitSign);
+      //  UnitSign);
       Out << llvm::format("%0.2f%c", ValNo / static_cast<double>(UnitSize),
                           UnitSign);
       return;

``````````

</details>


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


More information about the cfe-commits mailing list