summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-17 01:19:03 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-17 01:19:03 +0000
commitbffa89f42c43021d89f4a0e756601d57583cec7f (patch)
tree2fb28794899eb69bea2def43143838d094506f7a /clang
parent842e1449225a024a1d9da2e97fedbbc290ddfec9 (diff)
downloadbcm5719-llvm-bffa89f42c43021d89f4a0e756601d57583cec7f.tar.gz
bcm5719-llvm-bffa89f42c43021d89f4a0e756601d57583cec7f.zip
Check whether the IdentifierInfo is null, before using it.
llvm-svn: 76136
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Index/Entity.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Index/Entity.cpp b/clang/lib/Index/Entity.cpp
index 520d189826a..ca2e7c8f3e6 100644
--- a/clang/lib/Index/Entity.cpp
+++ b/clang/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());
OpenPOWER on IntegriCloud