[PATCH] D17700: [clang-format] Proposal for changes to Objective-C block formatting
Kent Sutherland via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 6 20:03:31 PST 2016
ksuther updated this revision to Diff 49928.
ksuther added a comment.
Thanks for the comments. I've made some changes that eliminates reverting r236598 and instead makes the behavior part of `IndentNestedBlocks`. That allows the Google Obj-C code style (https://google.github.io/styleguide/objcguide.xml#Blocks) to still work by default. The issue with a parameter between block parameters has also been fixed (as part of `AllowNewlineBeforeBlockParameter`).
Apologies if I'm missing something obvious, but I don't see how `AllowNewlineBeforeBlockParameter` belongs in `BraceWrapping`. Blocks aren't the same as braces, in the original example, this option would be controlling the newline insertion for `completionBlock:^(SessionWindow* window) {` and not just the opening brace.
http://reviews.llvm.org/D17700
Files:
include/clang/Format/Format.h
lib/Format/ContinuationIndenter.cpp
lib/Format/Format.cpp
unittests/Format/FormatTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17700.49928.patch
Type: text/x-patch
Size: 7886 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160307/362b4045/attachment.bin>
More information about the cfe-commits
mailing list