[cfe-dev] CXXRecordDecl::viewInheritance crashes

David Come via cfe-dev cfe-dev at lists.llvm.org
Tue Feb 28 07:30:33 PST 2017


Hello,

I found that CXXRecordDecl::viewInheritance crashes on the following 
code when printing C inheritance

template <class T> struct A {};
template <class U> class C: A<U>{};


My visitor for XXXRecordDecl is the following :

bool Visitor::VisitCXXRecordDecl(clang::CXXRecordDecl *c) {

   if (c->getNumBases() || c->getNumVBases()) {

      c->viewInheritance(astContext);

   }

   return true;

}

I wanted to open a bug report but I don't have an account.


Regards,

Côme David





More information about the cfe-dev mailing list