[cfe-dev] abort calling getTypeSize
peeter.joot at gmail.com
Mon Feb 25 10:32:34 PST 2013
On Mon, Feb 25, 2013 at 12:35 PM, Dmitri Gribenko <gribozavr at gmail.com>wrote:
> You might want to examine the layout of an instantiation instead.
Okay, that makes sense. I can drive this from a CXXRecordDecl visitor,
bool VisitCXXRecordDecl( CXXRecordDecl * r )
if ( r->isThisDeclarationADefinition() )
for ( CXXRecordDecl::field_iterator b = r->field_begin(), e =
b != e ; ++b )
const FieldDecl * a = *b ;
myVisitFieldDecl( a ) ;
return true ;
I found getInstantiatedFromMemberClass() in the docs, and it appears I can
use this to see if the template is an instantiation. However I'm having
trouble figuring out how to tell if the CXXRecordDecl is a template or not
(since I want to visit the fields of all instantanted template class decls
and all the fields of the plain old non-template classes).
I don't see a isTemplateClass() or anything like that? How would such a
check be done?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev