[Index] Add index::IndexingOptions::IndexImplicitInstantiation
authorFangrui Song <maskray@google.com>
Mon, 9 Jul 2018 21:49:06 +0000 (21:49 +0000)
committerFangrui Song <maskray@google.com>
Mon, 9 Jul 2018 21:49:06 +0000 (21:49 +0000)
commitd50f36ed7731de6f7238c2f5f69b5769e311bb41
tree6504eea14478ea65964f997d763c74b284c750ec
parent4fee1356edad7075195ad11810adf25f2bcb1f27
[Index] Add index::IndexingOptions::IndexImplicitInstantiation

Summary:
With IndexImplicitInstantiation=true, the following case records an occurrence of B::bar in A::foo, which will benefit cross reference tools.

template <class T> struct B { void bar() {}};
template <class T> struct A { void foo(B<T> *x) { x->bar(); }};
int main() { A<int> a; a.foo(0); }

Reviewers: akyrtzi, arphaman, rsmith

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D49002

llvm-svn: 336606
clang/include/clang/Index/IndexingAction.h
clang/lib/Index/IndexDecl.cpp
clang/lib/Index/IndexTypeSourceInfo.cpp
clang/lib/Index/IndexingContext.cpp
clang/lib/Index/IndexingContext.h