From 11af75bd5e3a0ee33a91cdd28ab31ce985800323 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Fri, 4 Mar 2016 04:24:32 +0000 Subject: [PATCH] [index] Ignore ObjCTypeParamDecls during indexing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262686 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Index/IndexingContext.cpp | 3 +++ test/Index/Core/index-source.m | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/lib/Index/IndexingContext.cpp b/lib/Index/IndexingContext.cpp index 1645a9ab0b..87bedd778a 100644 --- a/lib/Index/IndexingContext.cpp +++ b/lib/Index/IndexingContext.cpp @@ -103,6 +103,9 @@ bool IndexingContext::isFunctionLocalDecl(const Decl *D) { if (isa(D)) return true; + if (isa(D)) + return true; + if (!D->getParentFunctionOrMethod()) return false; diff --git a/test/Index/Core/index-source.m b/test/Index/Core/index-source.m index 766b6b198f..d57879c898 100644 --- a/test/Index/Core/index-source.m +++ b/test/Index/Core/index-source.m @@ -38,3 +38,8 @@ void goo(Base *b) { // CHECK-NEXT: RelBase | Sub | c:objc(cs)Sub @interface Sub : Base @end + +@interface NSArray : Base +// CHECK-NOT: ObjectType +-(ObjectType)getit; +@end -- 2.40.0