[cfe-dev] CXXRecordDecl: bases() vs vbases()
David Blaikie via cfe-dev
cfe-dev at lists.llvm.org
Wed Feb 10 11:09:58 PST 2021
ah, well, there you go :)
On Wed, Feb 10, 2021 at 11:01 AM Richard Smith <richard at metafoo.co.uk> wrote:
>
> On Wed, 10 Feb 2021 at 10:49, David Blaikie via cfe-dev <cfe-dev at lists.llvm.org> wrote:
>>
>> I'd guess 'bases()' probably gives direct base classes and vbases()
>> probably gives direct virtual base classes, eg:
>>
>> struct x : y, virtual z { };
>>
>> probably 'bases()' contains 'y' and 'vbases()' contains 'z' - but test
>> it and find out?
>
>
> bases() gives all direct bases (whether virtual or not), and vbases() gives all virtual bases (whether direct or not).
>
>>
>> On Wed, Feb 10, 2021 at 4:51 AM Deep Majumder via cfe-dev
>> <cfe-dev at lists.llvm.org> wrote:
>> >
>> > Hello everyone,
>> > While trying to iterate over the base classes of a class/struct represented by a CXXRecordDecl, I found two methods: one is bases() and the other is bases().
>> > Is it that bases() returns all instantiable base classes, while vbases() returns all abstract base classes? Or is it something different?
>> > Warm regards,
>> > Deep
>> > _______________________________________________
>> > cfe-dev mailing list
>> > cfe-dev at lists.llvm.org
>> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list