[PATCH] D45005: [clang-format] Set IndentWrappedObjCMethodNames to Always in google style
Ben Hamilton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 28 15:51:26 PDT 2018
benhamilton created this revision.
benhamilton added reviewers: djasper, klimek, jolesiak.
Herald added a subscriber: cfe-commits.
Now that we can separately control ObjC method name wrapping
and non-ObjC function name wrapping, this diff sets
`IndentWrappedObjCMethodNames` to `Always` for the Google style.
Depends On https://reviews.llvm.org/D45004
Test Plan: Updated test which manually set
`IndentWrappedFunctionNames` to no longer set that, confirmed
tests which depended on indenting wrapped ObjC method names
still passed.
Repository:
rC Clang
https://reviews.llvm.org/D45005
Files:
lib/Format/Format.cpp
unittests/Format/FormatTestObjC.cpp
Index: unittests/Format/FormatTestObjC.cpp
===================================================================
--- unittests/Format/FormatTestObjC.cpp
+++ unittests/Format/FormatTestObjC.cpp
@@ -573,7 +573,6 @@
// name is long.
Style = getGoogleStyle(FormatStyle::LK_ObjC);
Style.ColumnLimit = 40;
- Style.IndentWrappedFunctionNames = true;
verifyFormat("- (void)shortf:(GTMFoo *)theFoo\n"
" dontAlignNamef:(NSRect)theRect {\n"
"}");
Index: lib/Format/Format.cpp
===================================================================
--- lib/Format/Format.cpp
+++ lib/Format/Format.cpp
@@ -726,6 +726,7 @@
{"^<ext/.*\\.h>", 2}, {"^<.*\\.h>", 1}, {"^<.*", 2}, {".*", 3}};
GoogleStyle.IncludeIsMainRegex = "([-_](test|unittest))?$";
GoogleStyle.IndentCaseLabels = true;
+ GoogleStyle.IndentWrappedObjCMethodNames = FormatStyle::IWM_Always;
GoogleStyle.KeepEmptyLinesAtTheStartOfBlocks = false;
GoogleStyle.ObjCBinPackProtocolList = FormatStyle::BPS_Never;
GoogleStyle.ObjCSpaceAfterProperty = false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45005.140154.patch
Type: text/x-patch
Size: 1066 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180328/157474c1/attachment-0001.bin>
More information about the cfe-commits
mailing list