diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-01-10 00:42:07 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-01-10 00:42:07 +0000 |
commit | 880e538536d1a7597eb5805d67a08e3941577c7f (patch) | |
tree | 06f8cfb8e27233e685e847783b2b69c519fcbe0f | |
parent | b530fa374a8d4d96e61bf1dae8f4a73f4b3d2436 (diff) |
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
-rw-r--r-- | lib/Format/Format.cpp | 4 | ||||
-rw-r--r-- | unittests/Format/FormatTest.cpp | 2 |
2 files changed, 2 insertions, 4 deletions
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"); } |