[all-commits] [llvm/llvm-project] 74720d: [clang-format] Add AlignConsecutiveShortCaseStatem...

Owen via All-commits all-commits at lists.llvm.org
Mon Jul 24 18:39:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 74720d1b338efb0725dd80bf3e59069700f6e2f0
      https://github.com/llvm/llvm-project/commit/74720d1b338efb0725dd80bf3e59069700f6e2f0
  Author: Galen Elias <galenelias at gmail.com>
  Date:   2023-07-24 (Mon, 24 Jul 2023)

  Changed paths:
    M clang/docs/ClangFormatStyleOptions.rst
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Format/Format.h
    M clang/lib/Format/Format.cpp
    M clang/lib/Format/WhitespaceManager.cpp
    M clang/lib/Format/WhitespaceManager.h
    M clang/unittests/Format/ConfigParseTest.cpp
    M clang/unittests/Format/FormatTest.cpp

  Log Message:
  -----------
  [clang-format] Add AlignConsecutiveShortCaseStatements

This adds a new AlignConsecutiveShortCaseStatements option in line with the
existing AlignConsecutive* options , which when
AllowShortCaseLabelsOnASingleLine is enabled will align the tokens after the
case statement's colon. This also adds a AlignCaseColons option to allow
aligning the case label colon itself rather than the token after it.

Fixes #55475.

Differential Revision: https://reviews.llvm.org/D151761




More information about the All-commits mailing list