diff options
author | Haojian Wu <hokein.wu@gmail.com> | 2022-09-22 11:50:17 +0200 |
---|---|---|
committer | Haojian Wu <hokein.wu@gmail.com> | 2022-09-22 14:23:47 +0200 |
commit | e0cdafe8d4b2f1585f4756447b677fec37954ec4 (patch) | |
tree | 9120e18f1b10de8290ac221ab7ac3a2853d0cb27 /llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | |
parent | 525a400c7ca5725b4ab456b222176f580caf35e7 (diff) | |
download | llvm-e0cdafe8d4b2f1585f4756447b677fec37954ec4.zip llvm-e0cdafe8d4b2f1585f4756447b677fec37954ec4.tar.gz llvm-e0cdafe8d4b2f1585f4756447b677fec37954ec4.tar.bz2 |
[AST] Better recovery on an expression refers to an invalid decl.
Prior to the patch, we didn't build a DeclRefExpr if the Decl being
referred to is invalid, because many clang downstream AST consumers
assume it, violating it will cause many diagnostic regressions.
With this patch, we build a DeclRefExpr enven for an invalid decl (when the
AcceptInvalidDecl is true), and wrap it with a dependent-type
RecoveryExpr (to prevent follow-up semantic analysis, and diagnostic
regressions).
This is a revised version of https://reviews.llvm.org/D76831
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D121599
Diffstat (limited to 'llvm/lib/CodeGen/TwoAddressInstructionPass.cpp')
0 files changed, 0 insertions, 0 deletions