This patch does a few things:
- Fix aggregate initialization. When an aggregate has an initializer that is immediate-escalating, the context in which it is used automatically becomes an immediate function. The wording does that by rpretending an aggregate initialization is itself an invocation which is not really how clang works, so my previous attempt was... wrong.
- Fix initialization of defaulted constructors with immediate escalating default member initializers. The wording was silent about that case and I did not handled it fully https://cplusplus.github.io/CWG/issues/2760.html
- Fix diagnostics In some cases clang would produce additional and unhelpful diagnostics by listing the invalid references to consteval function that appear in immediate escalating functions
Note this is one of the reasons we didn;t get better diagnostics. It's adding there assuming this was an oversight.
Indeed, i see no reason CXXDefaultInitExpr should not be traversed if CXXDefaultArgExpr should.