[llvm] [UTC] Indent switch cases (PR #165212)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 27 08:24:33 PDT 2025
================
@@ -260,9 +260,14 @@ def update_test(ti: common.TestInfo):
skip_same_checks=dropped_previous_line,
):
# This input line of the function body will go as-is into the output.
- # Except make leading whitespace uniform: 2 spaces. 4 for debug records.
+ # Except make leading whitespace uniform: 2 spaces. 4 for debug records/switch cases.
indent = (
- " " if not common.IS_DEBUG_RECORD_RE.match(input_line) else " "
+ " " * 4
+ if (
+ common.IS_DEBUG_RECORD_RE.match(input_line)
+ or common.IS_SWITCH_CASE_RE.match(input_line)
----------------
nikic wrote:
Yes, though it would be `> 6`, see https://github.com/llvm/llvm-project/blob/964b4abe6c10642d29594a39a9291403218e56d6/llvm/utils/UpdateTestChecks/common.py#L31.
https://github.com/llvm/llvm-project/pull/165212
More information about the llvm-commits
mailing list