https://llvm.org/bugs/show_bug.cgi?id=25561
Bug ID: 25561 Summary: Clang assertion failure on template instantiation Product: clang Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: rtr...@google.com CC: ismail.pazarb...@gmail.com, llvm-bugs@lists.llvm.org Classification: Unclassified In clang::Sema::ActOnExplicitInstantiation in lib/Sema/SemaTemplate.cpp:7259, Clang hits an assertion when attempting to cast a TemplateDecl to a ClassTemplateDecl. 7259: ClassTemplateDecl *ClassTemplate = cast<ClassTemplateDecl>(TD); test.cc: class A {}; template <template <typename> class B> class C { template class B<A>; }; clang -cc1 test.cc clang: ../include/llvm/Support/Casting.h:237: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = clang::ClassTemplateDecl, Y = clang::TemplateDecl]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed. ... Stack dump: 0. Program arguments: clang -cc1 test.cc 1. test.cc:4:22: current parser token ';' 2. test.cc:3:1: parsing struct/union/class body 'C' Aborted (core dumped) -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs