[all-commits] [llvm/llvm-project] 2f209c: [clang-format] C# formatting a class with inherita...

MyDeveloperDay via All-commits all-commits at lists.llvm.org
Fri Dec 20 09:07:34 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2f209ccfbe5e6b33088763b1e022ba876fb0f35c
      https://github.com/llvm/llvm-project/commit/2f209ccfbe5e6b33088763b1e022ba876fb0f35c
  Author: mydeveloperday <mydeveloperday at gmail.com>
  Date:   2019-12-20 (Fri, 20 Dec 2019)

  Changed paths:
    M clang/lib/Format/UnwrappedLineParser.cpp
    M clang/unittests/Format/FormatTestCSharp.cpp

  Log Message:
  -----------
  [clang-format] C# formatting a class with inheritance followed by an attribute specifier assume its a braces initializer

Summary:
https://bugs.llvm.org/show_bug.cgi?id=44340

The rule that prevents `... {} [[....]]`  being treated as a braced initializer for C++ causes problems for C# with attributes, causing it to be incorrectly classified and then messing up the subsequent formatting. (see bug for details of formatting)

Reviewers: mitchell-stellar, klimek, sammccall

Reviewed By: mitchell-stellar

Subscribers: cfe-commits

Tags: #clang-format, #clang

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




More information about the All-commits mailing list