Merge commit 9ca395b5ade1 from llvm-project (by Haojian Wu):
[clang][AST] Propagate the contains-errors bit to DeclRefExpr from VarDecl's initializer. Similar to the https://reviews.llvm.org/D86048 (it only sets the bit for C++ code), we propagate the contains-errors bit for C-code path. Fixes https://github.com/llvm/llvm-project/issues/50236 Fixes https://github.com/llvm/llvm-project/issues/50243 Fixes https://github.com/llvm/llvm-project/issues/48636 Fixes https://github.com/llvm/llvm-project/issues/50320 Differential Revision: https://reviews.llvm.org/D154861
This fixes an assertion ('Assertion failed: ((LHSExpr->containsErrors()
RHSExpr->containsErrors()) && "Should only occur in error-recovery | |
path."), function BuildBinOp') when building parts of dtrace in certain
scenarios.
Reported by: dstolfa
PR: 271047
MFC after: 1 month