rC337815 / D49508 had to cannibalize one bit of CastExprBitfields::BasePathSize in order to squeeze PartOfExplicitCast boolean.
That reduced the maximal value of PartOfExplicitCast from 9 bits (~512) down to 8 bits (~256).
Apparently, that mattered. Too bad there weren't any tests.
It caused PR38356.
So we need to increase PartOfExplicitCast back at least to 9 bits, or a bit more.
For obvious reasons, we can't do that in CastExprBitfields - that would blow up the size of every Expr.
So we need to either just add a variable into the CastExpr (as done here),
or use llvm::TrailingObjects. The latter does not seem to be straight-forward.
Perhaps, that needs to be done not for the CastExpr itself, but for all of it's final children.
I'll let @rjmccall comment here, but I think I'd be willing to give up 2 more bytes here and just go with unsigned int. It has the advantage of likely never being an issue again (since 4 billion bases is not an issue).
We might be paying for those 2 ANYWAY with alignment as well, right?