This is wrong (see r366926); I'm just uploading it for my notes
IsExpression set on the context affects ony what determineStarAmpUsage()
does. For if and while, the result of determineStarAmpUsage() is always
ignored in practice:
- As of r172731, parseParens() overwrites the result with TT_BinaryOperator for * and & (and &&, added later) for the first occurrence in parens that has an identifier on both sides and that doesnn't look like a <op> b =. (Later r212040 propagated this to all later binary operators in the parens).
- As of r173256, modifyContext() (called determineTokenType() back then) converts * & && to the left of assignment operators to TT_PointerOrReference.
So in ifs and whiles, all initial token types get overwritten.
The kw_if and kw_while that this is removing were added in r188256,
which was after these two changes. However, r220805 later made the
case motivating this addition work in a different way.
(XXX C++17 initial-statements?)