r173787 - Reverting changes from r173785 (removing empty lines before "}").
Nico Weber
thakis at chromium.org
Tue Jan 29 10:54:54 PST 2013
On Tue, Jan 29, 2013 at 2:00 AM, Daniel Jasper <djasper at google.com> wrote:
> Author: djasper
> Date: Tue Jan 29 04:00:16 2013
> New Revision: 173787
>
> URL: http://llvm.org/viewvc/llvm-project?rev=173787&view=rev
> Log:
> Reverting changes from r173785 (removing empty lines before "}").
>
> This needs some more thinking, e.g. for namespaces, chains of if-else
> if, ...
Do these have test cases yet? Should they?
>
> 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=173787&r1=173786&r2=173787&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Format/Format.cpp (original)
> +++ cfe/trunk/lib/Format/Format.cpp Tue Jan 29 04:00:16 2013
> @@ -1990,8 +1990,6 @@ private:
> Style.MaxEmptyLinesToKeep + 1);
> if (Newlines == 0 && !Tok.IsFirst)
> Newlines = 1;
> - if (Tok.Tok.is(tok::r_brace) && Newlines > 1)
> - Newlines = 1;
> unsigned Indent = Level * 2;
>
> bool IsAccessModifier = false;
>
> Modified: cfe/trunk/unittests/Format/FormatTest.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=173787&r1=173786&r2=173787&view=diff
> ==============================================================================
> --- cfe/trunk/unittests/Format/FormatTest.cpp (original)
> +++ cfe/trunk/unittests/Format/FormatTest.cpp Tue Jan 29 04:00:16 2013
> @@ -136,7 +136,6 @@ TEST_F(FormatTest, FormatsUnwrappedLines
>
> TEST_F(FormatTest, FormatsNestedBlockStatements) {
> EXPECT_EQ("{\n {\n {}\n }\n}", format("{{{}}}"));
> - EXPECT_EQ("{\n {\n {}\n }\n}", format("{{{}}\n\n}"));
> }
>
> TEST_F(FormatTest, FormatsNestedCall) {
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list