[cfe-commits] r120421 - /cfe/trunk/lib/AST/DumpXML.cpp
John McCall
rjmccall at apple.com
Tue Nov 30 02:12:16 PST 2010
Author: rjmccall
Date: Tue Nov 30 04:12:16 2010
New Revision: 120421
URL: http://llvm.org/viewvc/llvm-project?rev=120421&view=rev
Log:
Make the dumper safe against null declaration names.
Modified:
cfe/trunk/lib/AST/DumpXML.cpp
Modified: cfe/trunk/lib/AST/DumpXML.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DumpXML.cpp?rev=120421&r1=120420&r2=120421&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DumpXML.cpp (original)
+++ cfe/trunk/lib/AST/DumpXML.cpp Tue Nov 30 04:12:16 2010
@@ -255,6 +255,9 @@
}
void setName(DeclarationName Name) {
+ if (!Name)
+ return set("name", "");
+
// Common case.
if (Name.isIdentifier())
return set("name", Name.getAsIdentifierInfo()->getName());
More information about the cfe-commits
mailing list