aboutsummaryrefslogtreecommitdiff
path: root/lib/Index
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-26 20:33:12 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-26 20:33:12 +0000
commitef915aab0ac566c55bfb0d7a9f6635bb5d94d4af (patch)
treeac935cfa19985d33098fc13e288b5ac830672dba /lib/Index
parent325377b57338e700317f5e423e5b0f1c08d99a39 (diff)
Vendor import of clang trunk r306325:vendor/clang/clang-trunk-r306325
Notes
Notes: svn path=/vendor/clang/dist/; revision=320376 svn path=/vendor/clang/clang-trunk-r306325/; revision=320377; tag=vendor/clang/clang-trunk-r306325
Diffstat (limited to 'lib/Index')
-rw-r--r--lib/Index/IndexDecl.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/Index/IndexDecl.cpp b/lib/Index/IndexDecl.cpp
index 2162c039c48b..d1127722c8ca 100644
--- a/lib/Index/IndexDecl.cpp
+++ b/lib/Index/IndexDecl.cpp
@@ -351,9 +351,11 @@ public:
IndexCtx.indexTagDecl(D, Relations);
} else {
auto *Parent = dyn_cast<NamedDecl>(D->getDeclContext());
+ SmallVector<SymbolRelation, 1> Relations;
+ gatherTemplatePseudoOverrides(D, Relations);
return IndexCtx.handleReference(D, D->getLocation(), Parent,
D->getLexicalDeclContext(),
- SymbolRoleSet());
+ SymbolRoleSet(), Relations);
}
}
return true;
@@ -609,18 +611,16 @@ public:
ClassTemplateSpecializationDecl *D) {
// FIXME: Notify subsequent callbacks if info comes from implicit
// instantiation.
- if (D->isThisDeclarationADefinition()) {
- llvm::PointerUnion<ClassTemplateDecl *,
- ClassTemplatePartialSpecializationDecl *>
- Template = D->getSpecializedTemplateOrPartial();
- const Decl *SpecializationOf =
- Template.is<ClassTemplateDecl *>()
- ? (Decl *)Template.get<ClassTemplateDecl *>()
- : Template.get<ClassTemplatePartialSpecializationDecl *>();
- IndexCtx.indexTagDecl(
- D, SymbolRelation(SymbolRoleSet(SymbolRole::RelationSpecializationOf),
- SpecializationOf));
- }
+ llvm::PointerUnion<ClassTemplateDecl *,
+ ClassTemplatePartialSpecializationDecl *>
+ Template = D->getSpecializedTemplateOrPartial();
+ const Decl *SpecializationOf =
+ Template.is<ClassTemplateDecl *>()
+ ? (Decl *)Template.get<ClassTemplateDecl *>()
+ : Template.get<ClassTemplatePartialSpecializationDecl *>();
+ IndexCtx.indexTagDecl(
+ D, SymbolRelation(SymbolRoleSet(SymbolRole::RelationSpecializationOf),
+ SpecializationOf));
if (TypeSourceInfo *TSI = D->getTypeAsWritten())
IndexCtx.indexTypeSourceInfo(TSI, /*Parent=*/nullptr,
D->getLexicalDeclContext());