hokein wrote:

> What differentiates the DecompositionDecl such that we need to mark the decl 
> invalid when there's an error in the RHS, while for other decls we don't? It 
> seems inconsistent.

DecompositionDecl (aka structure binding) is special here, a legal 
DecompositionDecl must be declared with a deduced `auto` type, so the its 
initializer should play part of the decl's invalid bit. For the error case 
where a DecompositionDecl with a non-deduced type, clang still builds the Decl 
AST node (with invalid bit) for better recovery. There are some oversight 
cases. This patch is fixing those.

https://github.com/llvm/llvm-project/pull/72428
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to