[cfe-dev] Determining if method is a constructor

Richard Smith richard at metafoo.co.uk
Sat Dec 1 13:55:42 PST 2012


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)



More information about the cfe-dev mailing list