This is an archive of the discontinued LLVM Phabricator instance.

Support offset of member designator with the arrow for __builtin_offsetof
Needs ReviewPublic

Authored by Jim on Jan 8 2020, 10:03 PM.

Details

Reviewers
efriedma
Summary

Push array index 0 into offsets to support offset of member designator x->b.

Diff Detail

Event Timeline

Jim created this revision.Jan 8 2020, 10:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 8 2020, 10:03 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Jim edited reviewers, added: efriedma; removed: eli.friedman.Jan 21 2020, 1:13 AM

Testcase?

I assume we give appropriate errors if you try to use "->" on a member that's not an array?

clang/lib/Parse/ParseExpr.cpp
2168

Did you fix this FIXME? Or does it no longer apply?