]> granicus.if.org Git - clang/commitdiff
clang-format: Undo r214508. It was essentially always removing the
authorDaniel Jasper <djasper@google.com>
Thu, 16 Apr 2015 07:02:19 +0000 (07:02 +0000)
committerDaniel Jasper <djasper@google.com>
Thu, 16 Apr 2015 07:02:19 +0000 (07:02 +0000)
space where we already had the flag ObjCSpaceBeforeProtocolList to
control it. I don't know what I was thinking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235076 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTest.cpp

index ff674e9e81fe7c5dc624423db8262303dc5f632a..5b148eab6b13b00c42aa6a804b6ae038f0303875 100644 (file)
@@ -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))
index e38759910ac2374b0a3e10c57138e25b018fdb97..9791e2a5fb95f10bf72ec86bbe45a81fde254c6c 100644 (file)
@@ -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"