[AST] Always set dependent-type for the CallExpr for error-recovery in C.
authorHaojian Wu <hokein.wu@gmail.com>
Fri, 9 Jun 2023 16:47:47 +0000 (18:47 +0200)
committerHaojian Wu <hokein.wu@gmail.com>
Mon, 12 Jun 2023 05:04:39 +0000 (07:04 +0200)
commit752b97129789dec1c2b6093bcbf848d6efb14523
treef1d96c06d0800379c9a828dc2005882c9dba8668
parent7282a37ff194885ef4aad0a68ad54011d43466b4
[AST] Always set dependent-type for the CallExpr for error-recovery in C.

When build CallExpr for error-recovery where we have any dependent
child nodes), we should set a dependent type for CallExpr to avoid
running into some unexpected following semantic analysis.

This also aligns with the C++ behavior.

This fixes the symptom crashes: https://github.com/llvm/llvm-project/issues/50244

Differential Revision: https://reviews.llvm.org/D152561
clang/docs/ReleaseNotes.rst
clang/lib/Sema/SemaExpr.cpp
clang/test/AST/ast-dump-recovery.c