aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/IndexingContext.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-01-14 02:05:51 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-01-14 02:05:51 +0000
commitdb4d7a5f47d13bf346260ac35eaafd2c92e5606e (patch)
tree314c2623af67411aed9f8f32068a21b3c675f1b3 /tools/libclang/IndexingContext.cpp
parent093ecc92afb70f6125d249eef31f40c0c57b7d24 (diff)
[libclang] If CXIndexOpt_IndexFunctionLocalSymbols is enabled, also
index parameters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148169 91177308-0d34-0410-b5e6-96231b3b80d8
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())) {