This is an archive of the discontinued LLVM Phabricator instance.

[AST] Preserve the incomplete-type member expr.
AbandonedPublic

Authored by hokein on Apr 28 2020, 7:57 AM.

Details

Reviewers
sammccall

Diff Detail

Event Timeline

hokein created this revision.Apr 28 2020, 7:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2020, 7:57 AM
sammccall added inline comments.Apr 28 2020, 11:08 AM
clang/lib/Sema/SemaExprCXX.cpp
7223

Sorry, I don't get what's going on here at all - is the idea that if you've already diagnosed an error here, don't fail further based on likely-bad recovery?

In that case:
a) we need a comment
b) how sure are you that this isn't establishing a "complete type" invariant that code later in this function relies on
c) can we avoid producing the extra diag that we don't think is reliable?

(maybe I misunderstood what's going on here)

clang/test/AST/ast-dump-recovery.cpp
107

This test doesn't seem to relate to member expressions, and passes for me without this patch applied.

hokein abandoned this revision.Apr 28 2020, 1:24 PM
hokein marked an inline comment as done.
hokein added inline comments.
clang/test/AST/ast-dump-recovery.cpp
107

oops, sorry, you are right, it works at head (I only verified the test after the patch is applied).

I was confused by a local modification (which preserves type), the recovery-expr make_incomplete().a will be dropped because we'll hit the above if statement. I'dd address this change in preserving-type patch.