[cfe-commits] r172024 - in /cfe/trunk: lib/Format/Format.cpp unittests/Format/FormatTest.cpp
Nico Weber
nicolasweber at gmx.de
Wed Jan 9 16:42:07 PST 2013
Author: nico
Date: Wed Jan 9 18:42:07 2013
New Revision: 172024
URL: http://llvm.org/viewvc/llvm-project?rev=172024&view=rev
Log:
Formatter: Remove unused @-formatting code.
@optional @property is put on two different unwrapped lines now, so this is no
longer necessary.
Modified:
cfe/trunk/lib/Format/Format.cpp
cfe/trunk/unittests/Format/FormatTest.cpp
Modified: cfe/trunk/lib/Format/Format.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=172024&r1=172023&r2=172024&view=diff
==============================================================================
--- cfe/trunk/lib/Format/Format.cpp (original)
+++ cfe/trunk/lib/Format/Format.cpp Wed Jan 9 18:42:07 2013
@@ -812,10 +812,6 @@
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;
}
Modified: cfe/trunk/unittests/Format/FormatTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=172024&r1=172023&r2=172024&view=diff
==============================================================================
--- cfe/trunk/unittests/Format/FormatTest.cpp (original)
+++ cfe/trunk/unittests/Format/FormatTest.cpp Wed Jan 9 18:42:07 2013
@@ -1347,6 +1347,8 @@
"- (void)optional;\n"
"@required\n"
"- (void)required;\n"
+ "@optional\n"
+ "@property(assign) int madProp;\n"
"@end\n");
}
More information about the cfe-commits
mailing list