aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/IndexingContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libclang/IndexingContext.cpp')
-rw-r--r--tools/libclang/IndexingContext.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/libclang/IndexingContext.cpp b/tools/libclang/IndexingContext.cpp
index f731580e66..299d1c93d8 100644
--- a/tools/libclang/IndexingContext.cpp
+++ b/tools/libclang/IndexingContext.cpp
@@ -261,7 +261,8 @@ bool IndexingContext::handleDecl(const NamedDecl *D,
ScratchAlloc SA(*this);
getEntityInfo(D, DInfo.EntInfo, SA);
- if (!DInfo.EntInfo.USR || Loc.isInvalid())
+ if ((!indexFunctionLocalSymbols() && !DInfo.EntInfo.USR)
+ || Loc.isInvalid())
return false;
if (suppressRefs())
@@ -829,6 +830,9 @@ void IndexingContext::getEntityInfo(const NamedDecl *D,
case Decl::Function:
EntityInfo.kind = CXIdxEntity_Function;
break;
+ case Decl::ParmVar:
+ EntityInfo.kind = CXIdxEntity_Variable;
+ break;
case Decl::Var:
EntityInfo.kind = CXIdxEntity_Variable;
if (isa<CXXRecordDecl>(D->getDeclContext())) {