Before:
static constexpr bool Bar = decltype(bar()) ::value;
After:
static constexpr bool Bar = decltype(bar())::value;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189449
91177308-0d34-0410-b5e6-
96231b3b80d8
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))
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) {