clang-format: Correctly identify multiplications in braces init lists.
Before:
int i{a *b};
After:
int i{a * b};
Also fix unrelated issue where braced init lists were counted as blocks
and prevented single-line functions.
llvm-svn: 209412
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 03177e5..471af1d5 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -690,7 +690,7 @@
if (I[1]->Last->Type == TT_LineComment)
return 0;
do {
- if (Tok->isOneOf(tok::l_brace, tok::r_brace) &&
+ if (Tok->is(tok::l_brace) && Tok->BlockKind != BK_BracedInit &&
!Style.AllowShortBlocksOnASingleLine)
return 0;
Tok = Tok->Next;