[PATCH] D102730: [clang-format] Support custom If macros

2021-06-23 Thread Vitali Lovich 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 rGbe9a87fe9bc3: [clang-format] Add IfMacros option (authored by vlovich). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D102730: [clang-format] Support custom If macros

2021-06-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102730/new/ https://reviews.llvm.org/D102730 ___ cfe-commits mailing list cfe-com

[PATCH] D102730: [clang-format] Support custom If macros

2021-06-22 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich updated this revision to Diff 353823. vlovich added a comment. Rebase onto main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102730/new/ https://reviews.llvm.org/D102730 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/Releas

[PATCH] D102730: [clang-format] Support custom If macros

2021-06-22 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. Seems to be okay for me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102730/new/ https://reviews.llvm.org/D102730 ___

[PATCH] D102730: [clang-format] Support custom If macros

2021-06-18 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich updated this revision to Diff 353150. vlovich marked an inline comment as done. vlovich added a comment. Fix clang-format issue Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102730/new/ https://reviews.llvm.org/D102730 Files: clang/docs/

[PATCH] D102730: [clang-format] Support custom If macros

2021-06-16 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich updated this revision to Diff 352573. vlovich added a comment. Review response I've updated coverage for AllowShortIfStatementsOnASingleLine and BreakBeforeBraces. SpacesInConditionalStatement is what the existing tests were covering so I don't think there's anything there to update. I lo

[PATCH] D102730: [clang-format] Support custom If macros

2021-06-16 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich added a comment. Just back from vacation so will try to polish this off today. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102730/new/ https://reviews.llvm.org/D102730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D102730: [clang-format] Support custom If macros

2021-05-28 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Thanks for working on this! Looks pretty nice, but please clang-format the changes and add some more test cases (cf. inline comment). Concerning the lexer part, I wouldn't do anything cleaner. Comment at: clang/unittests/Format/FormatTest.cpp:19719 +

[PATCH] D102730: [clang-format] Support custom If macros

2021-05-27 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich added inline comments. Comment at: clang/include/clang/Format/Format.h:2983 /// \endcode -SBPO_ControlStatementsExceptForEachMacros, +SBPO_ControlStatementsExceptControlMacros, /// Put a space before opening parentheses only if the parentheses are not --

[PATCH] D102730: [clang-format] Support custom If macros

2021-05-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a subscriber: krasimir. MyDeveloperDay added a comment. This kind of looks ok to me, I'm not sure about the "lexer" part, I guess I don't know the impact but I'd expect it to be small because it's conditional on your IfMacro I'd like @curdeius or @krasimir to take a look.

[PATCH] D102730: [clang-format] Support custom If macros

2021-05-22 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:2983 /// \endcode -SBPO_ControlStatementsExceptForEachMacros, +SBPO_ControlStatementsExceptControlMacros, /// Put a space before opening parentheses only if the parentheses

[PATCH] D102730: [clang-format] Support custom If macros

2021-05-21 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich added inline comments. Comment at: clang/docs/ReleaseNotes.rst:252 +- Option ``IfMacros`` has been added. This lets you define macros that get + formatted like conditionals much like ``ForEachMacros`` get stiled like + foreach loops. MyDeveloperDay wrot

[PATCH] D102730: [clang-format] Support custom If macros

2021-05-21 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich updated this revision to Diff 347150. vlovich marked 3 inline comments as done. vlovich added a comment. Review response. Updated the options I changed via the dump_format_style.py script but didn't ingest all the other changes it generated. Changed the SBPO option to have a more generic

[PATCH] D102730: [clang-format] Support custom If macros

2021-05-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ReleaseNotes.rst:252 +- Option ``IfMacros`` has been added. This lets you define macros that get + formatted like conditionals much like ``ForEachMacros`` get stiled like + foreach loops. stiled? did

[PATCH] D102730: [clang-format] Support custom If macros

2021-05-20 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich updated this revision to Diff 346870. vlovich added a comment. Fixed missing _ after the hyperlink to the KJ link in the Style options documentation. I'm assuming that's required formatting for hyperlinks by what renders the markdown. CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D102730: [clang-format] Support custom If macros

2021-05-20 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich updated this revision to Diff 346864. vlovich marked an inline comment as done. vlovich added a comment. Updated release notes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102730/new/ https://reviews.llvm.org/D102730 Files: clang/docs/ClangFormatStyleOptions.rst clang/doc

[PATCH] D102730: [clang-format] Support custom If macros

2021-05-20 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich marked an inline comment as done. vlovich added inline comments. Comment at: clang/include/clang/Format/Format.h:2098 + /// + /// For example: KJ_IF_MAYBE. + std::vector IfMacros; HazardyKnusperkeks wrote: > vlovich wrote: > > Should I put a hyperlink

[PATCH] D102730: [clang-format] Support custom If macros

2021-05-20 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich updated this revision to Diff 346863. vlovich added a comment. Review response: - Added additional tests. - Added `KJ_IF_MAYBE` to default `IfMacros`. - Added links to KJ documentation. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102730/new/ https://reviews.llvm.org/D102730

[PATCH] D102730: [clang-format] Support custom If macros

2021-05-20 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Looks good, but please add a test with the `else IF` and just `else` case. Also for me it would be ok to add your `KJ_IF_MAYBE` to the default configuration. But I have no experience on that. Comment at: clang/include/clang/Format/Format.h:

[PATCH] D102730: [clang-format] Support custom If macros

2021-05-18 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich added inline comments. Comment at: clang/include/clang/Format/Format.h:2098 + /// + /// For example: KJ_IF_MAYBE. + std::vector IfMacros; Should I put a hyperlink to https://github.com/capnproto/capnproto/blob/master/kjdoc/tour.md#maybes? Repository

[PATCH] D102730: [clang-format] Support custom If macros

2021-05-18 Thread Vitali Lovich via Phabricator via cfe-commits
vlovich created this revision. vlovich added reviewers: curdeius, MyDeveloperDay, HazardyKnusperkeks. vlovich added a project: clang-format. vlovich requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Like with ForEachMacros, support user to pr