[libcxx-commits] [libcxx] [libc++] Add a %{verify} substitution (PR #70878)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 31 17:21:00 PDT 2023


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

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

``````````bash
darker --check --diff -r 604eff60abfce09f956c3b0b1414f8d0d04b5d47..c67dbaeefcbde593d6790654a09264646da7bbc5 libcxx/utils/libcxx/test/format.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- format.py	2023-11-01 00:18:42.000000 +0000
+++ format.py	2023-11-01 00:20:54.065379 +0000
@@ -79,12 +79,19 @@
     #
     # Note: We use -Wno-error with %{verify} to make sure that we don't treat all diagnostics as
     #       errors, which doesn't make sense for clang-verify tests because we may want to check
     #       for specific warning diagnostics.
     _checkBaseSubstitutions(substitutions)
-    substitutions.append(("%{build}", "%{cxx} %s %{flags} %{compile_flags} %{link_flags} -o %t.exe"))
-    substitutions.append(("%{verify}", "%{cxx} %s %{flags} %{compile_flags} -fsyntax-only -Wno-error -Xclang -verify -Xclang -verify-ignore-unexpected=note -ferror-limit=0"))
+    substitutions.append(
+        ("%{build}", "%{cxx} %s %{flags} %{compile_flags} %{link_flags} -o %t.exe")
+    )
+    substitutions.append(
+        (
+            "%{verify}",
+            "%{cxx} %s %{flags} %{compile_flags} -fsyntax-only -Wno-error -Xclang -verify -Xclang -verify-ignore-unexpected=note -ferror-limit=0",
+        )
+    )
     substitutions.append(("%{run}", "%{exec} %t.exe"))
 
     # Parse the test file, including custom directives
     additionalCompileFlags = []
     fileDependencies = []
@@ -310,13 +317,11 @@
                     lit.Test.UNSUPPORTED,
                     "Test {} requires support for Clang-verify, which isn't supported by the compiler".format(
                         test.getFullName()
                     ),
                 )
-            steps = [
-                "%dbg(COMPILED WITH) %{verify}"
-            ]
+            steps = ["%dbg(COMPILED WITH) %{verify}"]
             return self._executeShTest(test, litConfig, steps)
         # Make sure to check these ones last, since they will match other
         # suffixes above too.
         elif filename.endswith(".pass.cpp") or filename.endswith(".pass.mm"):
             steps = [

``````````

</details>


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


More information about the libcxx-commits mailing list