]> granicus.if.org Git - clang/commitdiff
[index] Ignore ObjCTypeParamDecls during indexing.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 4 Mar 2016 04:24:32 +0000 (04:24 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 4 Mar 2016 04:24:32 +0000 (04:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262686 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Index/IndexingContext.cpp
test/Index/Core/index-source.m

index 1645a9ab0bdcbf191f8d322917477116a7b0acfd..87bedd778aefa66e7b0c83ba1d5c444aa242db2a 100644 (file)
@@ -103,6 +103,9 @@ bool IndexingContext::isFunctionLocalDecl(const Decl *D) {
   if (isa<TemplateTemplateParmDecl>(D))
     return true;
 
+  if (isa<ObjCTypeParamDecl>(D))
+    return true;
+
   if (!D->getParentFunctionOrMethod())
     return false;
 
index 766b6b198f25f977f85bbb48c87ec1c186602759..d57879c89884300ce665a911eb3b508b25b1552b 100644 (file)
@@ -38,3 +38,8 @@ void goo(Base *b) {
 // CHECK-NEXT: RelBase | Sub | c:objc(cs)Sub
 @interface Sub : Base<Prot2, Prot1>
 @end
+
+@interface NSArray<ObjectType> : Base
+// CHECK-NOT: ObjectType
+-(ObjectType)getit;
+@end