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 | 53a522e1306aff01960a0249ffe8bbd704e7abbe (patch) | |
tree | 7b9acbfd203418113340a923bf7242b8f399678e /lib/Index | |
parent | fedf7909ee64d739dde5639e9e01598acdb83d8c (diff) | |
download | clang-53a522e1306aff01960a0249ffe8bbd704e7abbe.tar.gz |
[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343767 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Index')
-rw-r--r-- | lib/Index/IndexTypeSourceInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Index/IndexTypeSourceInfo.cpp b/lib/Index/IndexTypeSourceInfo.cpp index 8342e93c15..85afc63450 100644 --- a/lib/Index/IndexTypeSourceInfo.cpp +++ b/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()) { |