[PATCH] D114583: [clang-format] Adjust braced list detection

2021-12-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. This is having an impact on code in flang, I don't deny it might be better, but it may not be what is wanted. - explicit Expr(const Scalar &x) : u{Constant{x}} {} - explicit Expr(Scalar &&x) : u{Constant{std::move(x)}} {} + explicit Expr(const Scalar &x)

[PATCH] D114583: [clang-format] Adjust braced list detection

2021-12-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. We might want to revert this until we get a solution to avoid flip flopping peoples formats, but this to me comes down to what we've been saying before about using the TT_ types to labels the types of `() {} []` I think in hindsight adding l_brace here just too g

[PATCH] D114583: [clang-format] Adjust braced list detection

2021-12-13 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. It appears that this regressed the formatting of initializer lists in some cases: # Before % cat ~/test.cc class A { A() : a{} {} A(int b) : b(b) {} A(int a, int b) : a(a), bs{{bs...}} { f(); } int a, b; }; # After % bui

[PATCH] D114583: [clang-format] Adjust braced list detection

2021-12-05 Thread Owen Pan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc41b3b0fa0f4: [clang-format] Adjust braced list detection (authored by cpplearner, committed by owenpan). Repository: rG LLVM Github Monorepo CHA

[PATCH] D114583: [clang-format] Adjust braced list detection

2021-12-05 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. Yes, I need someone to commit it on my behalf. My name and email address: `Tan S. B. ` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114583/new/ https://reviews.llvm.org/D114583 ___ cfe-commits mailing list cfe-co

[PATCH] D114583: [clang-format] Adjust braced list detection

2021-12-01 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. Thanks! Do you need someone to land this on your behalf? If yes, don't forget to send here your name and email. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114583/new/ https://reviews.llvm.org/D114583 ___

[PATCH] D114583: [clang-format] Adjust braced list detection

2021-12-01 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. Thanks for the update. (You forgot to add the context, but since it was already accepted it's okay.) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114583/new/

[PATCH] D114583: [clang-format] Adjust braced list detection

2021-11-30 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner updated this revision to Diff 390890. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114583/new/ https://reviews.llvm.org/D114583 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/unittests/Format/FormatTest.cpp Index: clang/unittests/Format/FormatTest.cpp ===

[PATCH] D114583: [clang-format] Adjust braced list detection

2021-11-25 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks requested changes to this revision. HazardyKnusperkeks added a comment. This revision now requires changes to proceed. That will be a pain in the ass to merge with my current changes, but looks good. In D114583#3153780 , @curdeius wrote

[PATCH] D114583: [clang-format] Adjust braced list detection

2021-11-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. I ran the examples from https://bugs.llvm.org/show_bug.cgi?id=38314 and its so much better than the previous state! Thanks for this patch, LGTM namespace n { void foo() {

[PATCH] D114583: [clang-format] Adjust braced list detection

2021-11-25 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner updated this revision to Diff 389822. cpplearner added a comment. Fixed tests. Since in JavaScript, the thing after `extends` must be an expression, and the thing after `implements` must be an object type, I decided to parse both as braced lists without going through `tryToParseBrace

[PATCH] D114583: [clang-format] Adjust braced list detection

2021-11-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. For your test I think its your test that is wrong, looking at the simpler versions (using clang-format-12) void foo() { { { int a; } } } void foo() { { int a; } } Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D114583: [clang-format] Adjust braced list detection

2021-11-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. The other failure is -class C extends {} {} +class C extends {} +{} I'm slightly struggling to work out in both cases if its the test that is wrong @cpplearner what do you think? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D114583: [clang-format] Adjust braced list detection

2021-11-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. FormatsBracedListsInColumnLayout is actually failing in its own test... it now produces void foo() { { // asdf { int a; } } { { int b; } } } rather than previously void foo() { {// asdf {int a; } } { { int b;