Before: for (int & a : Values) {}
After: for (int &a : Values) {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173259
91177308-0d34-0410-b5e6-
96231b3b80d8
}
}
if (Current.is(tok::kw_return) || Current.is(tok::kw_throw) ||
- (Current.is(tok::l_paren) && !Line.MustBeDeclaration))
+ (Current.is(tok::l_paren) && !Line.MustBeDeclaration &&
+ (Current.Parent == NULL || Current.Parent->isNot(tok::kw_for))))
IsExpression = true;
if (Current.Type == TT_Unknown) {
verifyIndependentOfContext("if (*b[i])");
verifyIndependentOfContext("if (int *a = (&b))");
verifyIndependentOfContext("while (int *a = &b)");
+ verifyFormat("void f() {\n"
+ " for (const int &v : Values) {\n"
+ " }\n"
+ "}");
verifyIndependentOfContext("A = new SomeType *[Length]();");
verifyGoogleFormat("A = new SomeType* [Length]();");