summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-01-29 09:42:11 +0000
committerDaniel Jasper <djasper@google.com>2013-01-29 09:42:11 +0000
commitaa94a90a79d2febcb2846ffa513bae148b88810f (patch)
tree19b1ed3748b3db94fd607f4fc82ba090b5b37fe6 /clang/lib/Format
parent0632dd410c7b4c415bfdd47fae16d44f47fecf1e (diff)
downloadbcm5719-llvm-aa94a90a79d2febcb2846ffa513bae148b88810f.tar.gz
bcm5719-llvm-aa94a90a79d2febcb2846ffa513bae148b88810f.zip
Remove empty lines before "}".
Those empty lines waste vertical whitespace and almost never increase readability. Before: void f() { DoSomething(); } After: void f() { DoSomething(); } llvm-svn: 173785
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/Format.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 8eebda0740b..58e6648ca30 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -1990,6 +1990,8 @@ 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;
OpenPOWER on IntegriCloud