summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Index/IndexingContext.cpp3
-rw-r--r--clang/test/Index/Core/index-source.m5
2 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Index/IndexingContext.cpp b/clang/lib/Index/IndexingContext.cpp
index 1645a9ab0bd..87bedd778ae 100644
--- a/clang/lib/Index/IndexingContext.cpp
+++ b/clang/lib/Index/IndexingContext.cpp
@@ -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;
diff --git a/clang/test/Index/Core/index-source.m b/clang/test/Index/Core/index-source.m
index 766b6b198f2..d57879c8988 100644
--- a/clang/test/Index/Core/index-source.m
+++ b/clang/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<Prot2, Prot1>
@end
+
+@interface NSArray<ObjectType> : Base
+// CHECK-NOT: ObjectType
+-(ObjectType)getit;
+@end
OpenPOWER on IntegriCloud