forked from OSchip/llvm-project
clang-format: Don't put useless space in f( ::g()).
llvm-svn: 174662
This commit is contained in:
parent
02cb6f9e91
commit
1455674741
|
@ -830,7 +830,8 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line,
|
||||||
if (Left.is(tok::coloncolon))
|
if (Left.is(tok::coloncolon))
|
||||||
return false;
|
return false;
|
||||||
if (Right.is(tok::coloncolon))
|
if (Right.is(tok::coloncolon))
|
||||||
return Left.isNot(tok::identifier) && Left.isNot(tok::greater);
|
return Left.isNot(tok::identifier) && Left.isNot(tok::greater) &&
|
||||||
|
Left.isNot(tok::l_paren);
|
||||||
if (Left.is(tok::less) || Right.is(tok::greater) || Right.is(tok::less))
|
if (Left.is(tok::less) || Right.is(tok::greater) || Right.is(tok::less))
|
||||||
return false;
|
return false;
|
||||||
if (Right.is(tok::amp) || Right.is(tok::star))
|
if (Right.is(tok::amp) || Right.is(tok::star))
|
||||||
|
|
|
@ -147,8 +147,9 @@ TEST_F(FormatTest, FormatsNestedCall) {
|
||||||
verifyFormat("Method(f1(f2, (f3())));");
|
verifyFormat("Method(f1(f2, (f3())));");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(FormatTest, ImportantSpaces) {
|
TEST_F(FormatTest, NestedNameSpecifiers) {
|
||||||
verifyFormat("vector< ::Type> v;");
|
verifyFormat("vector< ::Type> v;");
|
||||||
|
verifyFormat("::ns::SomeFunction(::ns::SomeOtherFunction())");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(FormatTest, OnlyGeneratesNecessaryReplacements) {
|
TEST_F(FormatTest, OnlyGeneratesNecessaryReplacements) {
|
||||||
|
|
Loading…
Reference in New Issue