[PATCH] D95168: Add InsertBraces option

2021-01-22 Thread Tiago Macarios via Phabricator via cfe-commits
tiagoma added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:2254 + + * ``BIS_WrapLikely`` (in configuration: ``WrapLikely``) +Insert braces if wrapping is likely curdeius wrote: > Shouldn't it be consistent with clang-tidy? So instead o

[PATCH] D95168: Add InsertBraces option

2021-01-21 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. True, I was aware of the presence of some of these options, thank you for indicating others. I'm not yet entirely convinced, especially that clang-tidy behaviour would be possibly different. Anyway, a few comments just from the first glance. Comment

[PATCH] D95168: Add InsertBraces option

2021-01-21 Thread Tiago Macarios via Phabricator via cfe-commits
tiagoma added a comment. Some background might be useful. I work at Microsoft (Office to be precise). We have our own fork of LLVM internally and I am starting to upstream some of the changes in our fork. > There's a clang-tidy check for it. Yes - readability-braces-around-statements. I would

[PATCH] D95168: Add InsertBraces option

2021-01-21 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. There's a clang-tidy check for it. And clang-format should not, IMO, add not remove tokens but only handle whitespace. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95168/new/ https://reviews.llvm.org/D95168

[PATCH] D95168: Add InsertBraces option

2021-01-21 Thread Tiago Macarios via Phabricator via cfe-commits
tiagoma created this revision. tiagoma requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. InsertBraces will insert braces for single line control flow statements (currently if/else/for). It currently accepts the following options: - Never -