r262686 - [index] Ignore ObjCTypeParamDecls during indexing.
Argyrios Kyrtzidis via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 3 20:24:33 PST 2016
Author: akirtzidis
Date: Thu Mar 3 22:24:32 2016
New Revision: 262686
URL: http://llvm.org/viewvc/llvm-project?rev=262686&view=rev
Log:
[index] Ignore ObjCTypeParamDecls during indexing.
Modified:
cfe/trunk/lib/Index/IndexingContext.cpp
cfe/trunk/test/Index/Core/index-source.m
Modified: cfe/trunk/lib/Index/IndexingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/IndexingContext.cpp?rev=262686&r1=262685&r2=262686&view=diff
==============================================================================
--- cfe/trunk/lib/Index/IndexingContext.cpp (original)
+++ cfe/trunk/lib/Index/IndexingContext.cpp Thu Mar 3 22:24:32 2016
@@ -103,6 +103,9 @@ bool IndexingContext::isFunctionLocalDec
if (isa<TemplateTemplateParmDecl>(D))
return true;
+ if (isa<ObjCTypeParamDecl>(D))
+ return true;
+
if (!D->getParentFunctionOrMethod())
return false;
Modified: cfe/trunk/test/Index/Core/index-source.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/Core/index-source.m?rev=262686&r1=262685&r2=262686&view=diff
==============================================================================
--- cfe/trunk/test/Index/Core/index-source.m (original)
+++ cfe/trunk/test/Index/Core/index-source.m Thu Mar 3 22:24:32 2016
@@ -38,3 +38,8 @@ void goo(Base *b) {
// CHECK-NEXT: RelBase | Sub | c:objc(cs)Sub
@interface Sub : Base<Prot2, Prot1>
@end
+
+ at interface NSArray<ObjectType> : Base
+// CHECK-NOT: ObjectType
+-(ObjectType)getit;
+ at end
More information about the cfe-commits
mailing list