Skip to content
Unverified Commit 8f7fdd94 authored by Haojian Wu's avatar Haojian Wu Committed by GitHub
Browse files

[clang][AST] Invalidate DecompositionDecl if it has invalid initializer. (#72428)

Fix #67495, #72198

We build ill-formed AST nodes for invalid structured binding. For case
`int [_, b] = {0, 0};`, the `DecompositionDecl` is valid, and its
children `BindingDecl`s are valid but with a NULL type, this breaks
clang invariants in many places, and using these `BindingDecl`s can lead
to crashes. This patch fixes them by marking the DecompositionDecl and
its children invalid.
parent 1fbf5332
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment