[PATCH] D95538: [clang][Format] Evaluate FallbackStyle only if needed

2021-01-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Sure adding tests, sorry for leaving them out the first time. To give more insights, `format::getStyle()` tries to figure out `FallbackStyle` at the beginning of the function, and errors out if it can't. But in most cases `FallbackStyle` is not needed, e.g. there's alr

[PATCH] D95538: [clang][Format] Evaluate FallbackStyle only if needed

2021-01-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 319765. kadircet added a comment. - Add tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95538/new/ https://reviews.llvm.org/D95538 Files: clang/lib/Format/Format.cpp clang/unittests/Format/FormatTest

[PATCH] D95538: [clang][Format] Evaluate FallbackStyle only if needed

2021-01-27 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Why is fixing (or removing) the fallback style in the .clang-format file not enough?? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95538/new/ https://reviews.llvm.org/D95538 _

[PATCH] D95571: [clangd] Remove some obsolete options that are now always on

2021-01-27 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. I assume you'll handle the internal integration part ;) Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:453 -// FIXME: retire this flag in llvm 13 release cycle. -

[PATCH] D94500: Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-01-27 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. Thanks for working on this. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2967 + // needs to be indented. + bool ClosesBlock = + Line->MatchingOpening

[PATCH] D95538: [clang][Format] Evaluate FallbackStyle only if needed

2021-01-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D95538#2527335 , @curdeius wrote: > Why is fixing (or removing) the fallback style in the .clang-format file not > enough?? sure that would be one way to go, and that's what the user did already. It feels confusing to me that

<    1   2   3