Before:
template <class F>
void Call(F f) {
f.template operator() <int>();
}
After:
template <class F>
void Call(F f) {
f.template operator()<int>();
}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220202
91177308-0d34-0410-b5e6-
96231b3b80d8
return true;
if (Tok.Previous->Type == TT_TemplateCloser && Tok.is(tok::l_paren))
return Style.SpaceBeforeParens == FormatStyle::SBPO_Always;
+ if (Tok.Type == TT_TemplateOpener && Tok.Previous->is(tok::r_paren) &&
+ Tok.Previous->MatchingParen &&
+ Tok.Previous->MatchingParen->Type == TT_OverloadedOperatorLParen)
+ return false;
if (Tok.is(tok::less) && Tok.Previous->isNot(tok::l_paren) &&
Line.First->is(tok::hash))
return true;
" return left.group < right.group;\n"
"}");
verifyFormat("SomeType &operator=(const SomeType &S);");
+ verifyFormat("f.template operator()<int>();");
verifyGoogleFormat("operator void*();");
verifyGoogleFormat("operator SomeType<SomeType<int>>();");