[cfe-dev] CXXBaseOrMemberInitializer ctor path
Martin Vejnár
avakar at technika.junior.cz
Wed Sep 29 07:52:48 PDT 2010
On Wed, 29 Sep 2010 15:33:17 +0100, "Jay L. T. Cornwall"
<jay at thefoundry.co.uk> wrote:
> I'd like to trace the constructor call sequence from a CXXConstructExpr.
> I get the CXXConstructorDecl and then recursively examine its bases for
> CXXBaseOrMemberInitializer.
>
> These reveal the base classes whose constructors are subsequently
> invoked (through ::getBaseClass()), but not the constructor itself. Are
> the overloads resolved in the AST or is this analysis handled elsewhere?
Hi, you can get the nested CXXConstructExpr through
CXXBaseOrMemberInitializer::getInit() and extract the constructor from
there.
--
Martin
More information about the cfe-dev
mailing list