// Thus, if the parent is a braced init list, we consider all
// brace blocks inside it braced init list. That works good enough
// for now, but we will need to fix it to correctly handle lambdas.
+ //
+ // We exclude + and - as they can be ObjC visibility modifiers.
if (NextTok->isOneOf(tok::comma, tok::semi, tok::r_paren,
- tok::l_brace, tok::colon)) {
+ tok::l_brace, tok::colon) ||
+ (NextTok->isBinaryOperator() &&
+ !NextTok->isOneOf(tok::plus, tok::minus))) {
Tok->BlockKind = BK_BracedInit;
LBraceStack.back()->BlockKind = BK_BracedInit;
} else {
" // comment 2\n"
" param3, param4\n"
" });");
+ verifyFormat(
+ "std::this_thread::sleep_for(\n"
+ " std::chrono::nanoseconds{ std::chrono::seconds{ 1 } } / 5);");
FormatStyle NoSpaces = getLLVMStyle();
NoSpaces.Cpp11BracedListStyle = true;