aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/IndexTypeSourceInfo.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-16 02:35:01 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-16 02:35:01 +0000
commitd6c8209fd1567db9c2721f441b50cb23cdf8d835 (patch)
tree6651b627fb5058fd0842c0068c66c1ce84ca8bea /tools/libclang/IndexTypeSourceInfo.cpp
parentc6b4a5099588fd21b49c80f730a596a64b2766c6 (diff)
[libclang] Indexing API: make sure we do not try to index local declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144764 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/IndexTypeSourceInfo.cpp')
-rw-r--r--tools/libclang/IndexTypeSourceInfo.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/libclang/IndexTypeSourceInfo.cpp b/tools/libclang/IndexTypeSourceInfo.cpp
index b63ebddfb0..5aeee0d263 100644
--- a/tools/libclang/IndexTypeSourceInfo.cpp
+++ b/tools/libclang/IndexTypeSourceInfo.cpp
@@ -36,6 +36,8 @@ public:
bool VisitTagTypeLoc(TagTypeLoc TL) {
TagDecl *D = TL.getDecl();
+ if (D->getParentFunctionOrMethod())
+ return true;
if (TL.isDefinition()) {
IndexCtx.indexTagDecl(D);