forked from OSchip/llvm-project
Never merge < and ::, as it produces different tokens.
Before: vector<::Type> t; After: vector< ::Type> t; llvm-svn: 172601
This commit is contained in:
parent
c36492b598
commit
736c14fac4
|
@ -1176,6 +1176,10 @@ private:
|
|||
Right.is(tok::l_paren) || Right.is(tok::l_brace) ||
|
||||
Right.is(tok::kw_true) || Right.is(tok::kw_false)))
|
||||
return false;
|
||||
if (Left.is(tok::coloncolon))
|
||||
return false;
|
||||
if (Right.is(tok::coloncolon))
|
||||
return Left.isNot(tok::identifier) && Left.isNot(tok::greater);
|
||||
if (Left.is(tok::less) || Right.is(tok::greater) || Right.is(tok::less))
|
||||
return false;
|
||||
if (Right.is(tok::amp) || Right.is(tok::star))
|
||||
|
@ -1191,10 +1195,6 @@ private:
|
|||
return false;
|
||||
if (Right.is(tok::l_square) && Right.Type != TT_ObjCMethodExpr)
|
||||
return false;
|
||||
if (Left.is(tok::coloncolon) ||
|
||||
(Right.is(tok::coloncolon) &&
|
||||
(Left.is(tok::identifier) || Left.is(tok::greater))))
|
||||
return false;
|
||||
if (Left.is(tok::period) || Right.is(tok::period))
|
||||
return false;
|
||||
if (Left.is(tok::colon))
|
||||
|
|
|
@ -131,6 +131,10 @@ TEST_F(FormatTest, FormatsNestedCall) {
|
|||
verifyFormat("Method(f1(f2, (f3())));");
|
||||
}
|
||||
|
||||
TEST_F(FormatTest, ImportantSpaces) {
|
||||
verifyFormat("vector< ::Type> v;");
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Tests for control statements.
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
Loading…
Reference in New Issue