summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index/IndexDecl.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2017-06-21 13:51:04 +0000
committerAlex Lorenz <arphaman@gmail.com>2017-06-21 13:51:04 +0000
commitd283dd4e060e627b844a15be1030dc0bb7ae53c7 (patch)
treef6ba715960d27edad312a19101563aa42ae04abc /clang/lib/Index/IndexDecl.cpp
parent5309b7d5c92f96e73ca5f4c0bfef05a66bdf5f31 (diff)
downloadbcm5719-llvm-d283dd4e060e627b844a15be1030dc0bb7ae53c7.tar.gz
bcm5719-llvm-d283dd4e060e627b844a15be1030dc0bb7ae53c7.zip
[index] Nested class declarations should be annotated with the
"specializationOf" relation if they pseudo-override a type in the base template This commit fixes an issue where Xcode's renaming engine couldn't find the reference to the second occurrence of "InnerClass" in this example: template<typename T> struct Ts { template<typename U> struct InnerClass { }; }; template<> struct Ts<int> { template<typename U> struct InnerClass; // This occurrence wasn't renamed }; rdar://31884960 Differential Revision: https://reviews.llvm.org/D34392 llvm-svn: 305911
Diffstat (limited to 'clang/lib/Index/IndexDecl.cpp')
-rw-r--r--clang/lib/Index/IndexDecl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Index/IndexDecl.cpp b/clang/lib/Index/IndexDecl.cpp
index 2162c039c48..2b0368131bb 100644
--- a/clang/lib/Index/IndexDecl.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud