[PATCH] D114320: [clang-format] Extend AllowShortBlocksOnASingleLine for else blocks
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 22 09:48:32 PST 2021
MyDeveloperDay added inline comments.
================
Comment at: clang/unittests/Format/FormatTest.cpp:5406
+ "{ }",
+ format("if(a){}else if(b){}else{}", Style), Style);
+ Style.BraceWrapping.AfterControlStatement = FormatStyle::BWACS_Never;
----------------
you can remove the "format(" here now..."
when its 2 arguments to `verifyFormat` its a kind of `verifyFormat(after,before,Style)`
alternatively you can use:
`verifyFormat(after,Style)`
it will deliberately `messUp` the the text and ensure it resets itself back to the desired after
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114320/new/
https://reviews.llvm.org/D114320
More information about the cfe-commits
mailing list