diff options
author | Fangrui Song <maskray@google.com> | 2018-07-09 21:49:06 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2018-07-09 21:49:06 +0000 |
commit | d50f36ed7731de6f7238c2f5f69b5769e311bb41 (patch) | |
tree | 6504eea14478ea65964f997d763c74b284c750ec /clang/lib/Index/IndexingContext.cpp | |
parent | 4fee1356edad7075195ad11810adf25f2bcb1f27 (diff) | |
download | bcm5719-llvm-d50f36ed7731de6f7238c2f5f69b5769e311bb41.tar.gz bcm5719-llvm-d50f36ed7731de6f7238c2f5f69b5769e311bb41.zip |
[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
Diffstat (limited to 'clang/lib/Index/IndexingContext.cpp')
-rw-r--r-- | clang/lib/Index/IndexingContext.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Index/IndexingContext.cpp b/clang/lib/Index/IndexingContext.cpp index 71b92bc6bf2..6c09ac7c09a 100644 --- a/clang/lib/Index/IndexingContext.cpp +++ b/clang/lib/Index/IndexingContext.cpp @@ -37,6 +37,10 @@ bool IndexingContext::shouldIndexFunctionLocalSymbols() const { return IndexOpts.IndexFunctionLocals; } +bool IndexingContext::shouldIndexImplicitInstantiation() const { + return IndexOpts.IndexImplicitInstantiation; +} + bool IndexingContext::handleDecl(const Decl *D, SymbolRoleSet Roles, ArrayRef<SymbolRelation> Relations) { |