[llvm] update_test_checks: keep names stable with generated functions (PR #87988)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 8 06:20:38 PDT 2024


Nicolai =?utf-8?q?Hähnle?= <nicolai.haehnle at amd.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/87988 at github.com>


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 451cad3a2735f33e8b24cc0b53497d0dc8939f78...d6863ea68ec2418b439f18f05c35c5018fe6784c llvm/utils/UpdateTestChecks/common.py
``````````

</details>

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

``````````diff
--- common.py	2024-04-08 13:16:03.000000 +0000
+++ common.py	2024-04-08 13:20:16.768387 +0000
@@ -457,11 +457,14 @@
 
                 if check_kind == "LABEL":
                     m = IR_FUNCTION_RE.match(line)
                     if m is not None:
                         func_name = m.group(1)
-                        if ti.args.function is not None and func_name != ti.args.function:
+                        if (
+                            ti.args.function is not None
+                            and func_name != ti.args.function
+                        ):
                             # When filtering on a specific function, skip all others.
                             continue
 
                         current_prefix = prefix
                         current_function = result[func_name][prefix] = []

``````````

</details>


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


More information about the llvm-commits mailing list