[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:58:51 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL322017: [index] Return when DC is null in handleReference (authored by MaskRay, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D41575
Files:
cfe/trunk/tools/libclang/CXIndexDataConsumer.cpp
Index: cfe/trunk/tools/libclang/CXIndexDataConsumer.cpp
===================================================================
--- cfe/trunk/tools/libclang/CXIndexDataConsumer.cpp
+++ cfe/trunk/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.128955.patch
Type: text/x-patch
Size: 710 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180108/44c39b51/attachment.bin>
More information about the cfe-commits
mailing list