[PATCH] D74830: [clang][Index] Fix the incomplete instantiations in libindex.

2020-02-20 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbb9e92bad55f: [clang][Index] Fix the incomplete instantiations in libindex. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74830/new/ h

[PATCH] D74830: [clang][Index] Fix the incomplete instantiations in libindex.

2020-02-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 245611. hokein added a comment. Fix the format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74830/new/ https://reviews.llvm.org/D74830 Files: clang-tools-extra/clangd/unittests/XRefsTests.cpp clang/lib/In

[PATCH] D74830: [clang][Index] Fix the incomplete instantiations in libindex.

2020-02-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74830/new/ https://reviews.llvm.org/D74830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[PATCH] D74830: [clang][Index] Fix the incomplete instantiations in libindex.

2020-02-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, please fix the formatting warnings though (at least the ones in the implementation) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7483

[PATCH] D74830: [clang][Index] Fix the incomplete instantiations in libindex.

2020-02-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/test/Index/Core/index-instantiated-source.cpp:103 +// explicit instantiations. +template class Foo; +Foo t3; kadircet wrote: > yes this is an explicit instantiation and will have TSKKind set properly. > > but i was

[PATCH] D74830: [clang][Index] Fix the incomplete instantiations in libindex.

2020-02-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 245608. hokein marked 3 inline comments as done. hokein added a comment. Add an explicit template declaration (not definition) testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74830/new/ https://reviews.l

[PATCH] D74830: [clang][Index] Fix the incomplete instantiations in libindex.

2020-02-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/lib/Index/IndexingContext.cpp:217 +// Fallback to primary template if this is an incomplete specialization. +if (SD->getTemplateSpecializationKind() == TSK_Undeclared) + return SD->getSpecializedTemplate()->getTemplat

[PATCH] D74830: [clang][Index] Fix the incomplete instantiations in libindex.

2020-02-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/Index/IndexingContext.cpp:175 + if (TKind == TSK_Undeclared) +return dyn_cast(D); + kadircet wrote: > kadircet wrote: > > i believe this might as well be an explicit instantiation, e.g. > > > > ``` > > tem

[PATCH] D74830: [clang][Index] Fix the incomplete instantiations in libindex.

2020-02-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 245601. hokein marked 4 inline comments as done. hokein added a comment. address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74830/new/ https://reviews.llvm.org/D74830 Files: clang-tools-ex

[PATCH] D74830: [clang][Index] Fix the incomplete instantiations in libindex.

2020-02-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/lib/Index/IndexingContext.cpp:175 + if (TKind == TSK_Undeclared) +return dyn_cast(D); + i believe this might as well be an explicit instantiation, e.g. ``` template struct Foo{}; template <> struct Foo; vo

[PATCH] D74830: [clang][Index] Fix the incomplete instantiations in libindex.

2020-02-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/lib/Index/IndexingContext.cpp:217 +// Fallback to primary template if this is an incomplete specialization. +if (SD->getTemplateSpecializationKind() == TSK_Undeclared) + return SD->getSpecializedTemplate()->getTemplat

[PATCH] D74830: [clang][Index] Fix the incomplete instantiations in libindex.

2020-02-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: usaxena95, arphaman, jkorous, ilya-biryukov. Herald added a project: clang. libindex will canonicalize references to template instantiations: - 1) reference to an explicit template specialization, report th