[clang] [clang-format] Add per-operator granularity for BreakBinaryOperations (PR #181051)

via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 19 12:09:15 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 clang/docs/tools/dump_format_style.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
--- dump_format_style.py	2026-02-17 21:21:50.000000 +0000
+++ dump_format_style.py	2026-02-19 20:08:31.049810 +0000
@@ -399,33 +399,26 @@
                                 version,
                                 enums[field_type].values,
                             )
                         )
                     else:
-                        vec_match = re.match(
-                            r"std::vector<(.*)>$", field_type
-                        )
+                        vec_match = re.match(r"std::vector<(.*)>$", field_type)
                         if vec_match and vec_match.group(1) in nested_structs:
                             inner_struct = nested_structs[vec_match.group(1)]
-                            display = (
-                                "List of %ss %s"
-                                % (vec_match.group(1), field_name)
+                            display = "List of %ss %s" % (
+                                vec_match.group(1),
+                                field_name,
                             )
                             nested_struct.values.append(
                                 NestedField(display, comment, version)
                             )
                             nested_struct.values.extend(inner_struct.values)
                         else:
-                            vec_match = re.match(
-                                r"std::vector<(.*)>$", field_type
-                            )
+                            vec_match = re.match(r"std::vector<(.*)>$", field_type)
                             if vec_match:
-                                display_type = (
-                                    "List of "
-                                    + pluralize(
-                                        to_yaml_type(vec_match.group(1))
-                                    )
+                                display_type = "List of " + pluralize(
+                                    to_yaml_type(vec_match.group(1))
                                 )
                             else:
                                 display_type = field_type
                             nested_struct.values.append(
                                 NestedField(

``````````

</details>


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


More information about the cfe-commits mailing list