Thanks Kim, that worked nicely:<div><br></div><div><div>         for ( CXXRecordDecl::ctor_iterator b = r->ctor_begin(), e = r->ctor_end() ;</div><div>               b != e ; ++b )</div><div>         {</div><div>            if ( !b->isImplicitlyDefined() )</div>
<div>            {</div><div>               cout << r->getName().str() << " : CONSTRUCTOR" << endl ;</div><div><br></div><div>               break ;</div><div>            }</div><div>         }</div>
<div><br></div></div><div>and is much cleaner.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Peeter<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

CXXRecordDecl has a ctor_begin/ctor_end pair, which return iterators<br>
over all constructors.<br>
<br>
They are of type CXXConstructorDecl, and that class in turn has an<br>
isImplicitlyDefined method you can use to check whether it's<br>
user-written or not.<br>
<br>
You should be able to loop over the RecordDecl's constructors and<br>
count the ones not implicitly defined.<br>
<br></blockquote><div> </div></div>
</div>