[index] Record C++17 global binding declarations
The global C++17 binding declarations should be indexed as variable symbols.
Differential Revision: https://reviews.llvm.org/D33920
llvm-svn: 305508
diff --git a/clang/lib/Index/IndexDecl.cpp b/clang/lib/Index/IndexDecl.cpp
index c4e9a1a..2162c03 100644
--- a/clang/lib/Index/IndexDecl.cpp
+++ b/clang/lib/Index/IndexDecl.cpp
@@ -293,6 +293,12 @@
return true;
}
+ bool VisitDecompositionDecl(const DecompositionDecl *D) {
+ for (const auto *Binding : D->bindings())
+ TRY_DECL(Binding, IndexCtx.handleDecl(Binding));
+ return Base::VisitDecompositionDecl(D);
+ }
+
bool VisitFieldDecl(const FieldDecl *D) {
SmallVector<SymbolRelation, 4> Relations;
gatherTemplatePseudoOverrides(D, Relations);