Unverified Commit 46944210 authored by Ding Fei's avatar Ding Fei Committed by GitHub
Browse files

[clang][Parser] Pop scope prior VarDecl invalidating by invalid init (#77434)

Invalid (direct) initializer would invalid `VarDecl` so
`InitializerScopeRAII` cannot restore scope stack balance.

As with other kind of initializer, `InitializerScopeRAII::pop()` is
moved up before `Sema::ActOnInitializerError()` which invalidates the
`VarDecl`, so scope can be balanced and current `DeclContext` can be
restored.

Fixes #30908
parent 412d7841
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment