From: John McCall Date: Tue, 30 Nov 2010 10:12:16 +0000 (+0000) Subject: Make the dumper safe against null declaration names. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6710cf1d5f3ab31524af6d72278ec5952f75b3c4;p=clang Make the dumper safe against null declaration names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120421 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/DumpXML.cpp b/lib/AST/DumpXML.cpp index ea9f1ccb79..5f1a3969d1 100644 --- a/lib/AST/DumpXML.cpp +++ b/lib/AST/DumpXML.cpp @@ -255,6 +255,9 @@ struct XMLDumper : public XMLDeclVisitor, } void setName(DeclarationName Name) { + if (!Name) + return set("name", ""); + // Common case. if (Name.isIdentifier()) return set("name", Name.getAsIdentifierInfo()->getName());