[PATCH] D108810: [clang-format] [PR51640] - New AfterEnum brace wrapping changes have cause C# behaviour to change

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 27 01:57:00 PDT 2021


MyDeveloperDay created this revision.
MyDeveloperDay added reviewers: krasimir, curdeius, HazardyKnusperkeks.
MyDeveloperDay added projects: clang, clang-format.
MyDeveloperDay requested review of this revision.

LLVM 13.0.0-rc2 shows change of behaviour in enum and interface BraceWrapping (likely before we simply didn't wrap)  but may be related to D99840: [clang-format] Correctly attach enum braces with ShortEnums disabled <https://reviews.llvm.org/D99840>

Logged as https://bugs.llvm.org/show_bug.cgi?id=51640

This change ensure AfterEnum works for

`internal|public|protected|private enum A {`  in the same way as it works for `enum A {` in C++

A similar issue was also observed with `interface` in C#


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108810

Files:
  clang/lib/Format/TokenAnnotator.cpp
  clang/unittests/Format/FormatTestCSharp.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108810.369043.patch
Type: text/x-patch
Size: 12298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210827/a27df65a/attachment.bin>


More information about the cfe-commits mailing list