[libclang] Add CXIndexOpt_IndexFunctionLocalSymbols indexing option to indicate
that one wants indexing callbacks for function-local symbols as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148160 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/IndexingContext.cpp b/tools/libclang/IndexingContext.cpp
index 14dbc97..f731580 100644
--- a/tools/libclang/IndexingContext.cpp
+++ b/tools/libclang/IndexingContext.cpp
@@ -551,7 +551,7 @@
return false;
if (Loc.isInvalid())
return false;
- if (D->getParentFunctionOrMethod())
+ if (!indexFunctionLocalSymbols() && D->getParentFunctionOrMethod())
return false;
if (isNotFromSourceFile(D->getLocation()))
return false;