Unverified Commit fc866fd2 authored by Haojian Wu's avatar Haojian Wu Committed by GitHub
Browse files

[clang] Don't preserve the typo expr in the recovery expr for invalid VarDecls (#90948)

With the commit d5308949, we now
preserve the initializer for invalid decls with the recovery-expr.

However there is a chance that the original init expr is a typo-expr, we
should not preserve it in the final AST, as typo-expr is an internal AST
node. We should use the one after the typo correction.

This is spotted by a clangd hover crash on the testcase.
parent 2b9210d1
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