diff options
author | Alex Lorenz <arphaman@gmail.com> | 2017-04-25 14:22:29 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2017-04-25 14:22:29 +0000 |
commit | 5bf767c54848baeeb37cc4afec1647871223828a (patch) | |
tree | 3f47c610d26d77d1676cbd9877eb63023157848b /clang/lib/Index/IndexDecl.cpp | |
parent | 178c369456a5ad187d6a08e3b269a81300825775 (diff) | |
download | llvm-5bf767c54848baeeb37cc4afec1647871223828a.zip llvm-5bf767c54848baeeb37cc4afec1647871223828a.tar.gz llvm-5bf767c54848baeeb37cc4afec1647871223828a.tar.bz2 |
[index] Record the 'SpecializationOf' relation for function specializations
rdar://31603531
llvm-svn: 301310
Diffstat (limited to 'clang/lib/Index/IndexDecl.cpp')
-rw-r--r-- | clang/lib/Index/IndexDecl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Index/IndexDecl.cpp b/clang/lib/Index/IndexDecl.cpp index ba65889..a60d2f6 100644 --- a/clang/lib/Index/IndexDecl.cpp +++ b/clang/lib/Index/IndexDecl.cpp @@ -206,6 +206,10 @@ public: } } gatherTemplatePseudoOverrides(D, Relations); + if (const auto *Base = D->getPrimaryTemplate()) + Relations.push_back( + SymbolRelation(SymbolRoleSet(SymbolRole::RelationSpecializationOf), + Base->getTemplatedDecl())); TRY_DECL(D, IndexCtx.handleDecl(D, Roles, Relations)); handleDeclarator(D); |