[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308269: [Index] Prevent canonical decl becoming nullptr (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D35212 Files: cfe/trunk/lib/Index/IndexingContext.cpp

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-17 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. LGTM, thank you! (Let me know if you need someone to commit this for you.) https://reviews.llvm.org/D35212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @vsk: thank you! https://reviews.llvm.org/D35212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 106930. krasimir added a comment. - Add an Index test case https://reviews.llvm.org/D35212 Files: lib/Index/IndexingContext.cpp test/Index/Core/no-templated-canonical-decl.cpp Index: test/Index/Core/no-templated-canonical-decl.cpp

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-17 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Take a look at the tests in clang/test/Index/Core. You should be able to write a test which uses c-index-test to dump the symbols in this source. https://reviews.llvm.org/D35212 ___ cfe-commits mailing list

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @vsk: could you help me turning this into a test case? https://reviews.llvm.org/D35212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I've figured out a test case for this: template class A> class B { typedef A A_int; }; The real-world problem comes from ptr_traits.h . https://reviews.llvm.org/D35212

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-13 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added subscribers: arphaman, vsk. vsk added a comment. Do you have a test case? https://reviews.llvm.org/D35212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-10 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. 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.