[cfe-dev] CXXRecordDecl::isDerivedFrom and public inheritance
Konstantin Tokarev
annulen at yandex.ru
Tue May 3 10:02:02 PDT 2011
03.05.2011, 19:07, "Douglas Gregor" <dgregor at apple.com>:
> On May 3, 2011, at 6:11 AM, Konstantin Tokarev wrote:
>
>> Hi all,
>>
>> Method CXXRecordDecl::isDerivedFrom allows to determine if some CXXRecordDecl
>> is derived from another, but does not take into account if inheritance is public, private,
>> or protected.
>>
>> Is there any way to determine if inheritance is public on all steps between base and
>> derived classes?
>
> One of the forms of isDerivedFrom() returns the base path that one follows to get to the base class. Sema's CheckBaseClassAccess knows how to check the accessibility of that base class using the base path.
How do I get QualType from CXXRecordDecl*?
BTW, I see that CheckBaseClassAccess uses CXXRecordDecl* internally. Will patch with similar method operating on CXXRecordDecl* arguments be welcomed?
--
Regards,
Konstantin
More information about the cfe-dev
mailing list