commit | e7d10a1f5058fab3b0cca5453dfb4838922edd37 | [log] [tgz] |
---|---|---|
author | Manuel Klimek <klimek@google.com> | Thu Jan 10 13:24:24 2013 +0000 |
committer | Manuel Klimek <klimek@google.com> | Thu Jan 10 13:24:24 2013 +0000 |
tree | 6278cff69b1f77472f1b135163918deb6770395c | |
parent | 494394d817b89050619c50bc58b282813e7a63bc [diff] [blame] |
Do not add newline in empty blocks. void f() {} now gets formatted in one line. llvm-svn: 172067
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index c0ed6c5..39efeab 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp
@@ -1033,6 +1033,8 @@ if (Left.is(tok::at) && Right.FormatTok.Tok.getObjCKeywordID() != tok::objc_not_keyword) return false; + if (Left.is(tok::l_brace) && Right.is(tok::r_brace)) + return false; return true; }