diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2016-08-03 05:38:53 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2016-08-03 05:38:53 +0000 |
commit | f60c395e84781f4842c416b3aede32be6d90eed7 (patch) | |
tree | 3bf10dcdab9b0dac34693ddecd99b0c3034bf924 /clang/lib/Index/IndexBody.cpp | |
parent | 2219d157481d0b253f00c5dd10b154a1b2743431 (diff) | |
download | bcm5719-llvm-f60c395e84781f4842c416b3aede32be6d90eed7.tar.gz bcm5719-llvm-f60c395e84781f4842c416b3aede32be6d90eed7.zip |
[index] Fix crash with indexing designated init expressions inside templates.
rdar://27452869
llvm-svn: 277570
Diffstat (limited to 'clang/lib/Index/IndexBody.cpp')
-rw-r--r-- | clang/lib/Index/IndexBody.cpp | 2 |
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); } |