[all-commits] [llvm/llvm-project] 716167: [clang-format] Correctly attach enum braces with S...

Marek Kurdej via All-commits all-commits at lists.llvm.org
Wed Jul 28 01:29:29 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 71616722d4092f88861e9eb337e2902bbab2cbd4
      https://github.com/llvm/llvm-project/commit/71616722d4092f88861e9eb337e2902bbab2cbd4
  Author: Luna Kirkby <llvm at moonbase.lgbt>
  Date:   2021-07-28 (Wed, 28 Jul 2021)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Format/Format.h
    M clang/lib/Format/UnwrappedLineParser.cpp
    M clang/unittests/Format/FormatTest.cpp
    M clang/unittests/Format/FormatTestCSharp.cpp

  Log Message:
  -----------
  [clang-format] Correctly attach enum braces with ShortEnums disabled

Previously, with AllowShortEnumsOnASingleLine disabled, enums that would have otherwise fit on a single line would always put the opening brace on its own line.
This patch ensures that these enums will only put the brace on its own line if the existing attachment rules indicate that it should.

Reviewed By: HazardyKnusperkeks, curdeius

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




More information about the All-commits mailing list