From: Argyrios Kyrtzidis Date: Fri, 17 Jul 2009 01:19:03 +0000 (+0000) Subject: Check whether the IdentifierInfo is null, before using it. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc0b11ef5d3c48309bf0df4369234dc28bc21fb4;p=clang Check whether the IdentifierInfo is null, before using it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76136 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Index/Entity.cpp b/lib/Index/Entity.cpp index 520d189826..ca2e7c8f3e 100644 --- a/lib/Index/Entity.cpp +++ b/lib/Index/Entity.cpp @@ -56,6 +56,9 @@ Entity *EntityGetter::get(Entity *Parent, DeclarationName Name) { return 0; IdentifierInfo *II = Name.getAsIdentifierInfo(); + if (!II) + return 0; + ProgramImpl::IdEntryTy *Id = &Prog.getIdents().GetOrCreateValue(II->getName(), II->getName() + II->getLength());