summaryrefslogtreecommitdiffstats
path: root/lib/Index/IndexDecl.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2017-08-15 17:20:37 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2017-08-15 17:20:37 +0000
commit5280dab80aa7e4fb0468730d88604a67efb7ac60 (patch)
treebac92635e22429271a25f19c350456f4cd4dca74 /lib/Index/IndexDecl.cpp
parentabc35c84541476ad090cb6e764e75ad2127f4c6e (diff)
[index] Update indexing to handle CXXDeductionGuideDecls properly
CXXDeductionGuideDecls can't be referenced so there's no need to output a symbol occurrence for them. Also handle DeducedTemplateSpecializationTypeLocs in the TypeIndexer so we don't miss the symbol occurrences of the corresponding template decls. Patch by Nathan Hawes! Differential Revision: https://reviews.llvm.org/D36641 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310933 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Index/IndexDecl.cpp')
-rw-r--r--lib/Index/IndexDecl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Index/IndexDecl.cpp b/lib/Index/IndexDecl.cpp
index c5230c0f9a..fe6beef670 100644
--- a/lib/Index/IndexDecl.cpp
+++ b/lib/Index/IndexDecl.cpp
@@ -267,6 +267,10 @@ public:
TypeNameInfo->getTypeLoc().getLocStart(),
Dtor->getParent(), Dtor->getDeclContext());
}
+ } else if (const auto *Guide = dyn_cast<CXXDeductionGuideDecl>(D)) {
+ IndexCtx.handleReference(Guide->getDeducedTemplate()->getTemplatedDecl(),
+ Guide->getLocation(), Guide,
+ Guide->getDeclContext());
}
// Template specialization arguments.
if (const ASTTemplateArgumentListInfo *TemplateArgInfo =