diff options
author | Haojian Wu <hokein@google.com> | 2018-10-04 11:03:55 +0000 |
---|---|---|
committer | Haojian Wu <hokein@google.com> | 2018-10-04 11:03:55 +0000 |
commit | e94c8694344369d16814b19e4828a6b42e4ea2c0 (patch) | |
tree | 156e2c4846d0ed04763819f9647fbb0009825943 /clang/lib | |
parent | aacd5e187b9111d2ee206f4e7b942e7243b6dbc4 (diff) | |
download | bcm5719-llvm-e94c8694344369d16814b19e4828a6b42e4ea2c0.tar.gz bcm5719-llvm-e94c8694344369d16814b19e4828a6b42e4ea2c0.zip |
[Index] Respect "IndexFunctionLocals" option for type loc.
Summary:
Previously, clang index ignored local symbols defined in the function body even
IndexFunctionLocals is true.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: ilya-biryukov, ioeric, arphaman, kadircet, cfe-commits
Differential Revision: https://reviews.llvm.org/D52877
llvm-svn: 343767
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Index/IndexTypeSourceInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Index/IndexTypeSourceInfo.cpp b/clang/lib/Index/IndexTypeSourceInfo.cpp index 8342e93c156..85afc634505 100644 --- a/clang/lib/Index/IndexTypeSourceInfo.cpp +++ b/clang/lib/Index/IndexTypeSourceInfo.cpp @@ -100,7 +100,8 @@ public: bool VisitTagTypeLoc(TagTypeLoc TL) { TagDecl *D = TL.getDecl(); - if (D->getParentFunctionOrMethod()) + if (!IndexCtx.shouldIndexFunctionLocalSymbols() && + D->getParentFunctionOrMethod()) return true; if (TL.isDefinition()) { |