summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hamilton <benhamilton@google.com>2017-12-14 21:44:11 +0000
committerBen Hamilton <benhamilton@google.com>2017-12-14 21:44:11 +0000
commit5b0c3ad564ad8fae0b8b99a39469fc074c2592c3 (patch)
tree60baf11acefb04404ea243a93a85194379826f91
parent11171336874260dc7b3327a7123b9e97ccb45b2b (diff)
downloadbcm5719-llvm-5b0c3ad564ad8fae0b8b99a39469fc074c2592c3.tar.gz
bcm5719-llvm-5b0c3ad564ad8fae0b8b99a39469fc074c2592c3.zip
Revert "[ClangFormat] IndentWrappedFunctionNames should be true in the google ObjC style"
This reverts commit 37e69667f748e1458b46483b7c1b8f9ba33eec44. We're going to discuss its ramifications further before making a conclusion. llvm-svn: 320747
-rw-r--r--clang/lib/Format/Format.cpp1
-rw-r--r--clang/unittests/Format/FormatTestObjC.cpp7
2 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 5ddc1644599..217c6729ee3 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -732,7 +732,6 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) {
GoogleStyle.SpacesInContainerLiterals = false;
} else if (Language == FormatStyle::LK_ObjC) {
GoogleStyle.ColumnLimit = 100;
- GoogleStyle.IndentWrappedFunctionNames = true;
}
return GoogleStyle;
diff --git a/clang/unittests/Format/FormatTestObjC.cpp b/clang/unittests/Format/FormatTestObjC.cpp
index 292466c0aa5..4220b44b4c4 100644
--- a/clang/unittests/Format/FormatTestObjC.cpp
+++ b/clang/unittests/Format/FormatTestObjC.cpp
@@ -382,9 +382,9 @@ TEST_F(FormatTestObjC, FormatObjCMethodDeclarations) {
" ofSize:(size_t)height\n"
" :(size_t)width;");
- Style = getGoogleStyle(FormatStyle::LK_ObjC);
// Continuation indent width should win over aligning colons if the function
// name is long.
+ Style = getGoogleStyle(FormatStyle::LK_ObjC);
Style.ColumnLimit = 40;
Style.IndentWrappedFunctionNames = true;
verifyFormat("- (void)shortf:(GTMFoo *)theFoo\n"
@@ -395,10 +395,7 @@ TEST_F(FormatTestObjC, FormatObjCMethodDeclarations) {
verifyFormat("- (void)shortf:(GTMFoo *)theFoo\n"
" aShortf:(NSRect)theRect {\n"
"}");
- // Wrapped method parameters should be indented.
- verifyFormat("- (LongReturnTypeName)\n"
- " longParam:(ParamName)longParamName\n"
- " param:(paramName)paramName;");
+
// Format pairs correctly.
Style.ColumnLimit = 80;
verifyFormat("- (void)drawRectOn:(id)surface\n"
OpenPOWER on IntegriCloud