[cfe-dev] Determining if method is a constructor

Victor Vicente de Carvalho victor.v.carvalho at gmail.com
Sun Dec 2 08:02:02 PST 2012


Thanks Richard, It worked.



Victor


2012/12/1 Richard Smith <richard at metafoo.co.uk>

> On Sat, Dec 1, 2012 at 1:39 PM, Victor Vicente de Carvalho
> <victor.v.carvalho at gmail.com> wrote:
> > While traversing a CXXRecordDecl methods through method_begin i've
> stumbled
> > with the class constructors and destructors being added as methods too
> (as
> > they already showed up on ctor_begin). So, what's the best way to
> determine
> > if the current method is a constructor or not?
>
> isa<CXXConstructorDecl>(Method)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121202/51d22e31/attachment.html>


More information about the cfe-dev mailing list