Before:
inline A operator^(const A &lhs, const A &rhs) {} int i;
After:
inline A operator^(const A &lhs, const A &rhs) {}
int i;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249517
91177308-0d34-0410-b5e6-
96231b3b80d8
case tok::l_paren:
parseParens();
break;
+ case tok::kw_operator:
+ nextToken();
+ if (FormatTok->isBinaryOperator())
+ nextToken();
+ break;
case tok::caret:
nextToken();
if (FormatTok->Tok.isAnyIdentifier() ||
verifyGoogleFormat("operator ::A();");
verifyFormat("using A::operator+;");
+ verifyFormat("inline A operator^(const A &lhs, const A &rhs) {}\n"
+ "int i;");
}
TEST_F(FormatTest, UnderstandsFunctionRefQualification) {