This is an archive of the discontinued LLVM Phabricator instance.

Fix noderef for AddrOf on MemberExpr
ClosedPublic

Authored by thejh on Nov 25 2020, 3:57 PM.

Details

Summary

As part of this change, one existing test case has to be adjusted
because it accidentally stripped the NoDeref attribute without
getting caught.

Depends on D92140

Diff Detail

Event Timeline

thejh created this revision.Nov 25 2020, 3:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 25 2020, 3:57 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
thejh requested review of this revision.Nov 25 2020, 3:57 PM
thejh added a comment.Nov 25 2020, 3:59 PM

(I marked this as depending on D92140 because if you apply this patch to the current HEAD directly, the tests will break.)

leonardchan accepted this revision.Nov 25 2020, 4:37 PM

LGTM. Thanks

clang/test/Frontend/noderef.c
75–76

These two can probably be removed since we have

p = &s->a;
p = &(*s).b;

above.

This revision is now accepted and ready to land.Nov 25 2020, 4:37 PM
thejh updated this revision to Diff 307728.Nov 25 2020, 4:43 PM

Removed duplicate tests as suggested by leonardchan

thejh marked an inline comment as done.Nov 25 2020, 4:45 PM
thejh added inline comments.
clang/test/Frontend/noderef.c
75–76

Good point, I've removed them now.

leonardchan closed this revision.Dec 7 2020, 2:51 PM

Ok this time I remembered the email. Unsure why the bug isn't automatically closed though.