[cfe-dev] CXXRecordDecl: bases() vs vbases()
Richard Smith via cfe-dev
cfe-dev at lists.llvm.org
Wed Feb 10 11:00:49 PST 2021
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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210210/a3600ef0/attachment.html>
More information about the cfe-dev
mailing list