[PATCH] D41575: [index] Return when DC is null in handleReference
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 8 10:51:07 PST 2018
MaskRay updated this revision to Diff 128953.
MaskRay added a comment.
rebase
Repository:
rC Clang
https://reviews.llvm.org/D41575
Files:
tools/libclang/CXIndexDataConsumer.cpp
Index: tools/libclang/CXIndexDataConsumer.cpp
===================================================================
--- tools/libclang/CXIndexDataConsumer.cpp
+++ tools/libclang/CXIndexDataConsumer.cpp
@@ -890,7 +890,7 @@
const DeclContext *DC,
const Expr *E,
CXIdxEntityRefKind Kind) {
- if (!D)
+ if (!D || !DC)
return false;
CXCursor Cursor = E ? MakeCXCursor(E, cast<Decl>(DC), CXTU)
@@ -907,7 +907,7 @@
if (!CB.indexEntityReference)
return false;
- if (!D)
+ if (!D || !DC)
return false;
if (Loc.isInvalid())
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41575.128953.patch
Type: text/x-patch
Size: 680 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180108/3544e1b6/attachment.bin>
More information about the cfe-commits
mailing list