[clang] Fix a crash with parenthesized aggregate initialization and base classes
When calling InitializeBase(...), TryOrBuidlParenListInit(...) needs to
pass in the parent entity; otherwise, we erroneously try to cast
CurContext to a CXXConstructorDecl[0], which can't be done since we're
performing aggregate initialization, not constructor initialization.
Field initialization is not affected, but this patch still adds some
tests for it.
Fixes 62296
[0]: https://github.com/llvm/llvm-project/blob/
33d6bd1c667456f7f4a9d338a7996a30a3af50a3/clang/lib/Sema/SemaAccess.cpp#L1696
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D149301