[Index] Prevent canonical decl becoming nullptr
Summary:
This patch prevents getCanonicalDecl returning nullptr in case it finds
a canonical TemplateDeclaration with no attached TemplatedDecl.
Found by running the indexer over a version of the standard library deep inside
a template metaprogramming mess.
Reviewers: klimek, vsk
Reviewed By: vsk
Subscribers: vsk, arphaman, cfe-commits
Differential Revision: https://reviews.llvm.org/D35212
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308269
91177308-0d34-0410-b5e6-
96231b3b80d8