summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index/IndexBody.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Index/IndexBody.cpp')
-rw-r--r--clang/lib/Index/IndexBody.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Index/IndexBody.cpp b/clang/lib/Index/IndexBody.cpp
index 4908d852e89..62f4e8802ae 100644
--- a/clang/lib/Index/IndexBody.cpp
+++ b/clang/lib/Index/IndexBody.cpp
@@ -148,7 +148,7 @@ public:
bool VisitDesignatedInitExpr(DesignatedInitExpr *E) {
for (DesignatedInitExpr::Designator &D : llvm::reverse(E->designators())) {
- if (D.isFieldDesignator())
+ if (D.isFieldDesignator() && D.getField())
return IndexCtx.handleReference(D.getField(), D.getFieldLoc(), Parent,
ParentDC, SymbolRoleSet(), {}, E);
}
OpenPOWER on IntegriCloud