clang-format: Fix space in decltype-constexprs.
Before: static constexpr bool Bar = decltype(bar()) ::value; After: static constexpr bool Bar = decltype(bar())::value; llvm-svn: 189449
This commit is contained in:
parent
d66476025a
commit
11be8ac590
|
@ -1180,7 +1180,8 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line,
|
|||
if (Left.is(tok::coloncolon))
|
||||
return false;
|
||||
if (Right.is(tok::coloncolon))
|
||||
return !Left.isOneOf(tok::identifier, tok::greater, tok::l_paren);
|
||||
return !Left.isOneOf(tok::identifier, tok::greater, tok::l_paren,
|
||||
tok::r_paren);
|
||||
if (Left.is(tok::less) || Right.isOneOf(tok::greater, tok::less))
|
||||
return false;
|
||||
if (Right.is(tok::ellipsis))
|
||||
|
|
|
@ -138,6 +138,7 @@ TEST_F(FormatTest, FormatsNestedCall) {
|
|||
TEST_F(FormatTest, NestedNameSpecifiers) {
|
||||
verifyFormat("vector< ::Type> v;");
|
||||
verifyFormat("::ns::SomeFunction(::ns::SomeOtherFunction())");
|
||||
verifyFormat("static constexpr bool Bar = decltype(bar())::value;");
|
||||
}
|
||||
|
||||
TEST_F(FormatTest, OnlyGeneratesNecessaryReplacements) {
|
||||
|
|
Loading…
Reference in New Issue