forked from OSchip/llvm-project
clang-format: Understand parameter pack initialization.
Before: Constructor(A... a) : a_(X<A> { std::forward<A>(a) }...) {} After: Constructor(A... a) : a_(X<A>{std::forward<A>(a)}...) {} llvm-svn: 214720
This commit is contained in:
parent
7ca7df0bf9
commit
65df5aa918
|
@ -354,7 +354,7 @@ void UnwrappedLineParser::calculateBraceTypes() {
|
|||
ProbablyBracedList =
|
||||
NextTok->isOneOf(tok::comma, tok::semi, tok::period, tok::colon,
|
||||
tok::r_paren, tok::r_square, tok::l_brace,
|
||||
tok::l_paren) ||
|
||||
tok::l_paren, tok::ellipsis) ||
|
||||
(NextTok->isBinaryOperator() && !NextIsObjCMethod);
|
||||
}
|
||||
if (ProbablyBracedList) {
|
||||
|
|
|
@ -4580,6 +4580,7 @@ TEST_F(FormatTest, UnderstandsTemplateParameters) {
|
|||
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaa >> aaaaa);",
|
||||
getLLVMStyleWithColumns(60));
|
||||
verifyFormat("static_assert(is_convertible<A &&, B>::value, \"AAA\");");
|
||||
verifyFormat("Constructor(A... a) : a_(X<A>{std::forward<A>(a)}...) {}");
|
||||
}
|
||||
|
||||
TEST_F(FormatTest, UnderstandsBinaryOperators) {
|
||||
|
|
Loading…
Reference in New Issue