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
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.