[clang] [clang] [Gnu] Improve GCCVersion parsing to match versions such as "10-win32" (PR #69079)

via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 14 14:18:49 PDT 2023


Martin =?utf-8?q?Storsjö?= <martin at martin.st>
Message-ID:
In-Reply-To: <llvm/llvm-project/pull/69079/clang at github.com>


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 bb6a98c8d2beee78ab9dc1a4c81009410e4911a3 2c923927f2aaf58e0879fe88b573fd1bc80063a5 -- clang/unittests/Driver/GCCVersionTest.cpp clang/lib/Driver/ToolChains/Gnu.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/unittests/Driver/GCCVersionTest.cpp b/clang/unittests/Driver/GCCVersionTest.cpp
index 91842a2ea959..5dd8a7d94b08 100644
--- a/clang/unittests/Driver/GCCVersionTest.cpp
+++ b/clang/unittests/Driver/GCCVersionTest.cpp
@@ -32,7 +32,7 @@ const VersionParseTest TestCases[] = {
     {"4.4.2-rc4", 4, 4, 2, "4", "4", "-rc4"},
     {"4.4.x-patched", 4, 4, -1, "4", "4", ""},
     {"not-a-version", -1, -1, -1, "", "", ""},
-    { "10-win32", 10, -1, -1, "10", "", "-win32" },
+    {"10-win32", 10, -1, -1, "10", "", "-win32"},
 };
 
 TEST(GCCVersionTest, Parse) {

``````````

</details>


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


More information about the cfe-commits mailing list