[PATCH] D75791: [clang-format] Added new option IndentExternBlock
Marcus Johnson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 19 06:28:34 PDT 2020
MarcusJohnson91 marked 5 inline comments as done.
MarcusJohnson91 added inline comments.
================
Comment at: clang/lib/Format/Format.cpp:812
true, true};
+ LLVMStyle.IndentExternBlock = FormatStyle::IEBS_AfterExternBlock;
LLVMStyle.BreakAfterJavaFieldAnnotations = false;
----------------
MyDeveloperDay wrote:
> is this one correct? AfterExternBLock is false in this case correct? should this be NoIndent?
Yes AfterExternBlock is set to false here, but IndentExternBlock is being set to IEBS_AfterExternBlock, so the code falls back to parsing it as if IndentExternBlock wasn't set, and AfterExternBlock was set.
so IEBS_AfterExternBlock works for both true and false values.
Setting it to NoIndent would change the codepath to the new one and it would lose the newline between `extern "C"` and `{` in the process.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75791/new/
https://reviews.llvm.org/D75791
More information about the cfe-commits
mailing list