CXXRecordDecl::viewInheritance crashes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CXXRecordDecl::viewInheritance crashes

David Chisnall via cfe-dev
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


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: CXXRecordDecl::viewInheritance crashes

David Chisnall via cfe-dev
Thanks for reporting the issue! 

I reproduced the issue and filed a bug report at http://bugs.llvm.org/show_bug.cgi?id=32095 with the relevant portion of the backtrace attached.

Alex

On 28 February 2017 at 15:30, David Come via cfe-dev <[hidden email]> wrote:
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


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev