[llvm] Make clang report garbage target versions. (PR #75373)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 12:14:29 PST 2023


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 fa5486e487a6f98358eca572efb4b1fd7d27d1f5 74f256d8a77ee2ba8e0d5bbb6519aa2729cf94d5 -- llvm/lib/TargetParser/Triple.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/TargetParser/Triple.cpp b/llvm/lib/TargetParser/Triple.cpp
index 335253194d..f6f23f0ef9 100644
--- a/llvm/lib/TargetParser/Triple.cpp
+++ b/llvm/lib/TargetParser/Triple.cpp
@@ -11,9 +11,9 @@
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/SwapByteOrder.h"
 #include "llvm/Support/VersionTuple.h"
+#include "llvm/Support/raw_ostream.h"
 #include "llvm/TargetParser/ARMTargetParser.h"
 #include "llvm/TargetParser/ARMTargetParserCommon.h"
 #include "llvm/TargetParser/Host.h"
@@ -1201,8 +1201,8 @@ StringRef Triple::getOSAndEnvironmentName() const {
 static VersionTuple parseVersionFromName(StringRef Name) {
   VersionTuple Version;
   if (Version.tryParse(Name)) {
-    errs() << "The input is "<< Name << " and it is invalid. Should pass an "<<
-    "integer or integer combination! e.g. 2, 9.5 or 3.4.5\n";
+    errs() << "The input is " << Name << " and it is invalid. Should pass an "
+           << "integer or integer combination! e.g. 2, 9.5 or 3.4.5\n";
     exit(1);
   }
   return Version.withoutBuild();

``````````

</details>


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


More information about the llvm-commits mailing list