[all-commits] [llvm/llvm-project] 292058: [clang-format] Fix Microsoft style for enums

Aaron Smith via All-commits all-commits at lists.llvm.org
Thu Apr 30 09:12:57 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 292058a5d6d708ec7d285a452d4350b33ba080dc
      https://github.com/llvm/llvm-project/commit/292058a5d6d708ec7d285a452d4350b33ba080dc
  Author: Aaron Smith <aaron.smith at microsoft.com>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

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

  Log Message:
  -----------
  [clang-format] Fix Microsoft style for enums

Summary:
Before this change enums were formatted incorrectly for the Microsoft style.

[C++ Example]

    enum {
      one,
      two
    } three, four;

[Incorrectly Formatted]

    enum
    {
      one,
      two
    } three,
        four;

[Correct Format with Patch]

    enum
    {
      one,
      two
    } three, four;

Reviewers: jbcoe, MyDeveloperDay, rnk

Reviewed By: MyDeveloperDay

Subscribers: cfe-commits

Tags: #clang, #clang-format

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




More information about the All-commits mailing list