aboutsummaryrefslogtreecommitdiff
path: root/lib/Index/Entity.cpp
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
commitdc0b11ef5d3c48309bf0df4369234dc28bc21fb4 (patch)
treee74d46caef92aada1c057d62cc2fbd7eab954fdc /lib/Index/Entity.cpp
parentcd7bf230a77c550115e4a78ee371fc49a7563692 (diff)
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
Diffstat (limited to 'lib/Index/Entity.cpp')
-rw-r--r--lib/Index/Entity.cpp3
1 files changed, 3 insertions, 0 deletions
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());