Before this patch, CXXCtorInitializers that don't typecheck get discarded in
most cases. In particular:
- typos that can't be corrected don't turn into RecoveryExpr. The full expr disappears instead, and without an init expr we discard the node.
- initializers that fail initialization (e.g. constructor overload resolution) are discarded too.
This patch addresses both these issues (a bit clunkily and repetitively, for
member/base/delegating initializers)
It does not preserve any AST nodes when the member/base can't be resolved or
other problems of that nature. That breaks invariants of CXXCtorInitializer
itself, and we don't have a "weak" RecoveryCtorInitializer like we do for Expr.
I believe the changes to diagnostics in existing tests are improvements.
(We're able to do some analysis on the non-broken parts of the initializer)
it is unclear to me why we need a isDependentContext() here? looks like this would special-case RecoveryExpr, the following dependent code-path would not be executed for RecoveryExpr case?