diff options
author | Daniel Jasper <djasper@google.com> | 2015-04-16 07:02:19 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-04-16 07:02:19 +0000 |
commit | 20e15563fff92cb1568770dc2170a61a06a74018 (patch) | |
tree | a2eb3e127e8f13d1e27ac3f41fd6ea57959a506d | |
parent | f56f98c925521f4ed0f3b5adeb27e78477d96407 (diff) | |
download | bcm5719-llvm-20e15563fff92cb1568770dc2170a61a06a74018.tar.gz bcm5719-llvm-20e15563fff92cb1568770dc2170a61a06a74018.zip |
clang-format: Undo r214508. It was essentially always removing the
space where we already had the flag ObjCSpaceBeforeProtocolList to
control it. I don't know what I was thinking.
llvm-svn: 235076
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 2 | ||||
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index ff674e9e81f..5b148eab6b1 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -1664,7 +1664,7 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, if (Right.isOneOf(tok::semi, tok::comma)) return false; if (Right.is(tok::less) && - (Left.isOneOf(tok::kw_template, tok::r_paren) || + (Left.is(tok::kw_template) || (Line.Type == LT_ObjCDecl && Style.ObjCSpaceBeforeProtocolList))) return true; if (Left.isOneOf(tok::exclaim, tok::tilde)) diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index e38759910ac..9791e2a5fb9 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -6751,7 +6751,7 @@ TEST_F(FormatTest, FormatObjCInterface) { "+ (id)init;\n" "@end"); - verifyGoogleFormat("@interface Foo (HackStuff) <MyProtocol>\n" + verifyGoogleFormat("@interface Foo (HackStuff)<MyProtocol>\n" "+ (id)init;\n" "@end"); @@ -6793,7 +6793,7 @@ TEST_F(FormatTest, FormatObjCInterface) { FormatStyle OnePerLine = getGoogleStyle(); OnePerLine.BinPackParameters = false; - verifyFormat("@interface aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa () <\n" + verifyFormat("@interface aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ()<\n" " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n" " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n" " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,\n" |