diff options
author | Manuel Klimek <klimek@google.com> | 2013-01-10 13:24:24 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2013-01-10 13:24:24 +0000 |
commit | 36fab8d70eee342d66e03c9b09c029f126196103 (patch) | |
tree | 9a24e011325a032e70cce92707687997af9c147f /lib/Format/Format.cpp | |
parent | 46ef852618b18bc79e403b37a12c9b692e76126b (diff) |
Do not add newline in empty blocks.
void f() {}
now gets formatted in one line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172067 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r-- | lib/Format/Format.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index c0ed6c5be1..39efeab52c 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -1033,6 +1033,8 @@ private: 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; } |