[cfe-dev] Beginnings of C++ access control
Tim Northover
T.P.Northover at sms.ed.ac.uk
Sat Apr 18 10:27:15 PDT 2009
Hello,
I've been working on implementing C++ access control in the Sema stage, and
now have a very preliminary patch (hopefully attached, otherwise inline in a
followup -- still not sure if the list supports attachments).
At the moment it's limited to explicit 'obj.mem' lookups, but I thought I'd
send it here to make sure I'm on roughly the right track before fiddling with
every single possible use. It should be reasonably easy to extent to other
contexts.
Here are a few things I'd particularly welcome comments on:
The beginning of AccessMemberFromRecord (importing anonymous struct/union defs
into the outer class) feels like it ought to be reinventing the wheel, is
there some handy function I should be using instead? If there isn't a reusable
version it should probably be involved in private resolution too in
CheckMemberAccess. I've held off putting it there for now.
I've reused the access specifier AS_none to denote an inaccessible member.
Would people prefer me to invent a new enum for this situation?
Tim.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: access_first.diff
Type: text/x-patch
Size: 12568 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090418/2f92ccaa/attachment.bin>
More information about the cfe-dev
mailing list