[llvm-branch-commits] [llvm] [FLMD] Add MDFunctionLocalContext support to update_test_checks (PR #244621)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Nov 23 06:58:12 PST 2026


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 origin/main...HEAD llvm/utils/UpdateTestChecks/common.py
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
--- common.py	2026-11-23 14:49:29.000000 +0000
+++ common.py	2026-11-23 14:57:36.536132 +0000
@@ -2531,19 +2531,19 @@
         lines = []
         for m in global_ir_value_re.finditer(raw_tool_output):
             # Attach the substring's start index so that CHECK lines
             # can be sorted properly even if they are matched by different nameless values.
             # This is relevant for GLOB and GLOBNAMED since they may appear interlaced.
-            if not m.group(0).endswith('['):
+            if not m.group(0).endswith("["):
                 lines.append((m.start(), [m.group(0)]))
             else:
                 # For FLMD, we actually have many lines for a single entry, and must include all of them.
-                succeeding_text: str = raw_tool_output[m.start():]
+                succeeding_text: str = raw_tool_output[m.start() :]
                 entry_lines = []
                 for line in succeeding_text.splitlines():
                     entry_lines.append(line)
-                    if line.endswith('])'):
+                    if line.endswith("])"):
                         break
                 lines.append((m.start(), entry_lines))
 
         for prefix in prefixes:
             if glob_val_dict[prefix] is None:
@@ -2718,14 +2718,22 @@
                         global_tbaa_records,
                         preserve_names,
                         unstable_globals_only=True,
                     )
                     new_lines[0] = filter_unstable_metadata(new_lines[0])
-                    check_line = "%s %s: %s" % (comment_marker, checkprefix, new_lines[0])
+                    check_line = "%s %s: %s" % (
+                        comment_marker,
+                        checkprefix,
+                        new_lines[0],
+                    )
                     check_lines.append((i, check_line))
                     for idx, new_line in enumerate(new_lines[1:]):
-                        check_line = "%s %s-NEXT: %s" % (comment_marker, checkprefix, new_line)
+                        check_line = "%s %s-NEXT: %s" % (
+                            comment_marker,
+                            checkprefix,
+                            new_line,
+                        )
                         # This is an incorrect idx in terms of actual file position, but correct in terms of ordering.
                         check_lines.append((i + idx + 1, check_line))
                 if not check_lines:
                     continue
 

``````````

</details>


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


More information about the llvm-branch-commits mailing list