]> granicus.if.org Git - clang/commitdiff
Formatter: Remove unused @-formatting code.
authorNico Weber <nicolasweber@gmx.de>
Thu, 10 Jan 2013 00:42:07 +0000 (00:42 +0000)
committerNico Weber <nicolasweber@gmx.de>
Thu, 10 Jan 2013 00:42:07 +0000 (00:42 +0000)
@optional @property is put on two different unwrapped lines now, so this is no
longer necessary.

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

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

index beea48e9a3f52b6e8a27bb4aea8d758577b50a11..1ab577049c6336a1a3ba7894ff95d2fc8d20d215 100644 (file)
@@ -812,10 +812,6 @@ public:
           TT_LineComment || (Current.is(tok::string_literal) &&
                              Current.Parent->is(tok::string_literal))) {
         Current.MustBreakBefore = true;
-      } else if (Current.is(tok::at) && Current.Parent->Parent->is(tok::at)) {
-        // Don't put two objc's '@' on the same line. This could happen,
-        // as in, @optional @property ...
-        Current.MustBreakBefore = true;
       } else {
         Current.MustBreakBefore = false;
       }
index 9ed6b5f0f9a34f34785fa0773d03d2243ccadd09..389c58c4288a684575f64c02c183ebf5e07ac678 100644 (file)
@@ -1347,6 +1347,8 @@ TEST_F(FormatTest, FormatObjCProtocol) {
                "- (void)optional;\n"
                "@required\n"
                "- (void)required;\n"
+               "@optional\n"
+               "@property(assign) int madProp;\n"
                "@end\n");
 }