This is an archive of the discontinued LLVM Phabricator instance.

[AST][RecoveryAST] Populate error-bit from Type to Expr.
ClosedPublic

Authored by hokein on Jun 18 2020, 7:52 AM.

Details

Summary

Looks like this is a fallout when we introduce the error-bit in Type.

Diff Detail

Event Timeline

hokein created this revision.Jun 18 2020, 7:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2020, 7:52 AM
sammccall accepted this revision.Jun 24 2020, 12:17 AM
sammccall added inline comments.
clang/include/clang/AST/DependenceFlags.h
123

oops! seems like we should be able to observe this directly in an AST dump test too, which should be failing to mark some nodes as error-dependent.
(Not sure if there's a simpler example than your crashing testcase though)

This revision is now accepted and ready to land.Jun 24 2020, 12:17 AM
hokein marked 2 inline comments as done.Jun 24 2020, 1:18 AM
hokein added inline comments.
clang/include/clang/AST/DependenceFlags.h
123

yes, in theory. The code path need to go through "error expr" -> "error type" -> "recovery expr", but it seems not easy to produce a case in non-template context, either we bail out too early, or the recovery expression is not built.

This revision was automatically updated to reflect the committed changes.
hokein marked an inline comment as done.