[all-commits] [llvm/llvm-project] fc866f: [clang] Don't preserve the typo expr in the recove...
Haojian Wu via All-commits
all-commits at lists.llvm.org
Tue May 7 00:11:40 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fc866fd2a2cfca6d62f48dcf83778959fd24f559
https://github.com/llvm/llvm-project/commit/fc866fd2a2cfca6d62f48dcf83778959fd24f559
Author: Haojian Wu <hokein.wu at gmail.com>
Date: 2024-05-07 (Tue, 07 May 2024)
Changed paths:
M clang-tools-extra/clangd/unittests/HoverTests.cpp
M clang/lib/Sema/SemaDecl.cpp
M clang/test/AST/ast-dump-recovery.cpp
Log Message:
-----------
[clang] Don't preserve the typo expr in the recovery expr for invalid VarDecls (#90948)
With the commit d5308949cf884d8e4b971d51a8b4f73584c4adec, 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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list