]> granicus.if.org Git - clang/commit
[Index] Prevent canonical decl becoming nullptr
authorKrasimir Georgiev <krasimir@google.com>
Tue, 18 Jul 2017 07:20:53 +0000 (07:20 +0000)
committerKrasimir Georgiev <krasimir@google.com>
Tue, 18 Jul 2017 07:20:53 +0000 (07:20 +0000)
commit906b61f528d9cba41ed36193916675e38d1c3310
tree7fb145d3ae9902bb49ccbeb9917dcba54e345275
parentd0d080025d8dcf56db1fb86dc6951b247d4f2b39
[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
lib/Index/IndexingContext.cpp
test/Index/Core/no-templated-canonical-decl.cpp [new file with mode: 0644]