clang-format: Fix corner case in AllowShortBlocksOnASingleLine.
Before:
template <int> struct A4 { A4() { }
};
After:
template <int i> struct A4 {
A4() {}
};
This fixes llvm.org/PR19813 (at least the part that isn't working as
intended).
llvm-svn: 209438
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 2821e4a..3df1366 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -690,8 +690,7 @@
if (I[1]->Last->Type == TT_LineComment)
return 0;
do {
- if (Tok->is(tok::l_brace) && Tok->BlockKind != BK_BracedInit &&
- !Style.AllowShortBlocksOnASingleLine)
+ if (Tok->is(tok::l_brace) && Tok->BlockKind != BK_BracedInit)
return 0;
Tok = Tok->Next;
} while (Tok);