[clang] [Clang] [Sema] Don't crash on unexpanded pack in invalid block literal (PR #110762)

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 2 13:14:43 PDT 2024


hokein wrote:

The current solution seems reasonable to me.

> somehow including the malformed block in the AST (by wrapping it in a RecoveryExpr perhaps?)

`RecoveryExpr` is designed to preserve `Expr` nodes, so it can't be used to retain arbitrary AST nodes. In the case of `(^Ts)`, as far as I understand, `Ts` is parsed as a block-id, making RecoveryExpr inapplicable.

https://github.com/llvm/llvm-project/pull/110762


More information about the cfe-commits mailing list