[PATCH] D104388: [clang-format] PR50727 C# Invoke Lamda Expression indentation incorrect

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 24 04:16:42 PDT 2021


MyDeveloperDay updated this revision to Diff 354205.
MyDeveloperDay added a comment.

Fix `parseBracedList()` to do what `parseStructuralElement()` does (with regard to breaking `AfterFunction`, I'm not completely convinced `AfterFunction` should have been reused for that but might be too late to change.

This fixes the somewhat random indentation but also ensue the `{` is on a newline in Microsoft style like the other lambda in the unit tests, add tests to show that the indentation is being handled by the IndentWidth and that GoogleStyle handles the `{` positioning correctly.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104388/new/

https://reviews.llvm.org/D104388

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104388.354205.patch
Type: text/x-patch
Size: 6450 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210624/ec270f97/attachment.bin>


More information about the cfe-commits mailing list