[PATCH] D95168: [clang-format] Add Insert/Remove Braces option

2022-02-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay abandoned this revision. MyDeveloperDay added a comment. Abandoning as replaced with a better solution D120217: [clang-format] Add an option to insert braces after control statements CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95168/n

[PATCH] D95168: [clang-format] Add Insert/Remove Braces option

2021-11-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/BraceInserter.cpp:21-56 +bool SupportsAnyAutomaticBraces(FormatStyle &Style, bool insertion) { + if (insertion) { +if (Style.AutomaticBraces.AfterIf == FormatStyle::BIS_Always) + return true; +if (St

[PATCH] D95168: [clang-format] Add Insert/Remove Braces option

2021-11-13 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Should I copy my comments on the old file? Comment at: clang/lib/Format/BraceInserter.cpp:21-56 +bool SupportsAnyAutomaticBraces(FormatStyle &Style, bool insertion) { + if (insertion) { +if (Style.AutomaticBraces.AfterIf == FormatStyle::

[PATCH] D95168: [clang-format] Add Insert/Remove Braces option

2021-11-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 8 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/BraceInserter.cpp:21-56 +bool SupportsAnyAutomaticBraces(FormatStyle &Style, bool insertion) { + if (insertion) { +if (Style.AutomaticBraces.AfterIf == FormatS

[PATCH] D95168: [clang-format] Add Insert/Remove Braces option

2021-11-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 387015. MyDeveloperDay marked an inline comment as done. MyDeveloperDay edited the summary of this revision. MyDeveloperDay added a comment. Add more LLVM rules, and don't remove when there are single or multi lines comments CHANGES SINCE LAST ACTION

[PATCH] D95168: [clang-format] Add Insert/Remove Braces option

2021-11-04 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:946 +/// Remove if there is no comment +BIS_RemoveNoComment + }; MyDeveloperDay wrote: > HazardyKnusperkeks wrote: > > Maybe differentiate between single line and m

[PATCH] D95168: [clang-format] Add Insert/Remove Braces option

2021-11-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:1131 + * ``BIS_Remove`` (in configuration: ``Remove``) +Always remove braces. + Oops missed regenerating this.! (next ti

[PATCH] D95168: [clang-format] Add Insert/Remove Braces option

2021-11-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang/include/clang/Format/Format.h:946 +/// Remove if there is no comment +BIS_RemoveNoComment + }; HazardyKnusperkeks wrote: > Maybe differentiate betwee

[PATCH] D95168: [clang-format] Add Insert/Remove Braces option

2021-11-04 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Not yet done reviewing everything. Comment at: clang/include/clang/Format/Format.h:946 +/// Remove if there is no comment +BIS_RemoveNoComment + }; Maybe differentiate between single line and multi line comments? =

[PATCH] D95168: [clang-format] Add Insert/Remove Braces option

2021-11-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 384715. MyDeveloperDay retitled this revision from "[clang-format] Add InsertBraces option" to "[clang-format] Add Insert/Remove Braces option". MyDeveloperDay edited the summary of this revision. MyDeveloperDay added a comment. This is very much a WIP