[cfe-dev] Where to put member pointers in the type hierarchy?
Douglas Gregor
dgregor at apple.com
Sat Jan 24 10:02:15 PST 2009
On Jan 24, 2009, at 9:18 AM, Sebastian Redl wrote:
> Douglas Gregor wrote:
>> On Jan 24, 2009, at 7:16 AM, Sebastian Redl wrote:
>>
>>> I need to extend the AST type hierarchy. So I'm
>>> wondering where to put member pointers. Should they be a subclass of
>>> PointerType, of PointerLikeType, or just of Type?
>>
>> In standards parlance, member pointers are not actually pointers, so
>> they should subclass "Type".
>
> So Pointer is out. But PointerLike is our own invention. (I believe
> you're not a fan of this class, though.)
No, I don't particularly like PointerLike. It's only really useful for
CodeGen, IMHO, and it doesn't even save that much effort their. Member
pointers are their own kind of beast, that should subclass Type.
- Doug
More information about the cfe-dev
mailing list