From: Nico Weber Date: Thu, 10 Jan 2013 00:42:07 +0000 (+0000) Subject: Formatter: Remove unused @-formatting code. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=880e538536d1a7597eb5805d67a08e3941577c7f;p=clang Formatter: Remove unused @-formatting code. @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 --- diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index beea48e9a3..1ab577049c 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -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; } diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 9ed6b5f0f9..389c58c428 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -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"); }