[PATCH] D102730: [clang-format] Support custom If macros
Marek Kurdej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 28 13:26:49 PDT 2021
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
+ verifyFormat("MYIF( a )\n return;\nelse MYIF( b )\n return;", Spaces);
+ verifyFormat("MYIF( a )\n return;\nelse\n return;", Spaces);
}
----------------
Please add a test to see the interaction with `AllowShortIfStatementsOnASingleLine`, and maybe `BreakBeforeBraces`, `BraceWrappingAfterControlStatementStyle`, `SpacesInConditionalStatement`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102730/new/
https://reviews.llvm.org/D102730
More information about the cfe-commits
mailing list