Commit 3bfae781 authored by Tom Eccles's avatar Tom Eccles Committed by Tom Stellard
Browse files

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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment