]> granicus.if.org Git - clang/commitdiff
Check whether the IdentifierInfo is null, before using it.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 17 Jul 2009 01:19:03 +0000 (01:19 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 17 Jul 2009 01:19:03 +0000 (01:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76136 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Index/Entity.cpp

index 520d189826aa5a85a306df641d99522c863387d7..ca2e7c8f3e6b85041706196ffa7f75ca68551d06 100644 (file)
@@ -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());