Fix crash getting name of a template decl
NamedDecl::getIdentifier can return a nullptr when DeclarationName::isIdentifier is false, which leads to a null pointer dereference when TypePrinter::printTemplateId calls ->getName(). NamedDecl::getName does the same thing in the successful case and returns an empty string in the failure case. This crash affects the llvm 14 packages on llvm.org. (cherry picked from commit 225b91e6)
parent
76c1c1dd
Please register or sign in to comment