summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index/IndexBody.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Index/IndexBody.cpp')
-rw-r--r--clang/lib/Index/IndexBody.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/Index/IndexBody.cpp b/clang/lib/Index/IndexBody.cpp
index dd8a1c7b3f7..54a6df2496a 100644
--- a/clang/lib/Index/IndexBody.cpp
+++ b/clang/lib/Index/IndexBody.cpp
@@ -9,6 +9,7 @@
#include "IndexingContext.h"
#include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/AST/ASTLambda.h"
using namespace clang;
using namespace clang::index;
@@ -454,6 +455,16 @@ public:
}
return true;
}
+
+ bool VisitParmVarDecl(ParmVarDecl* D) {
+ // Index the parameters of lambda expression.
+ if (IndexCtx.shouldIndexFunctionLocalSymbols()) {
+ const auto *DC = D->getDeclContext();
+ if (DC && isLambdaCallOperator(DC))
+ IndexCtx.handleDecl(D);
+ }
+ return true;
+ }
};
} // anonymous namespace
OpenPOWER on IntegriCloud