[cfe-dev] Is there a simpler way to determine the accessing permission of a C++ class member?

Limin Fu phoolimin at gmail.com
Wed Jun 22 23:02:11 PDT 2011


OK, the easiest way is to use getAccess(). I have tried this before, but I
made a typo in a variable name, so I didn't get the expected result and
thought this method is for something else:(.  Only after searching through
the clang source codes, I am convinced this must be the method I was looking
for, and find out the bug in my codes.


On Wed, Jun 22, 2011 at 3:20 PM, Limin Fu <phoolimin at gmail.com> wrote:

> Hello,
>
> I have been trying to understand how to determine the accessing permission
> of a member in a C++ class. The only way I can find out is to iterate
> through the declarations of CXXRecordDecl and check for AccessSpecDecl. Is
> there a simpler way than this? Any hint will be appreciated.
>
> Limin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110622/bf6a2b50/attachment.html>


More information about the cfe-dev mailing list