[cfe-commits] r135273 - in /cfe/trunk: lib/Sema/SemaObjCProperty.cpp test/Index/c-index-api-loadTU-test.m

Douglas Gregor dgregor at apple.com
Fri Jul 15 08:30:21 PDT 2011


Author: dgregor
Date: Fri Jul 15 10:30:21 2011
New Revision: 135273

URL: http://llvm.org/viewvc/llvm-project?rev=135273&view=rev
Log:
When creating a property in a class extension, make sure to check its
attributes. Fixes <rdar://problem/9561076>.

Modified:
    cfe/trunk/lib/Sema/SemaObjCProperty.cpp
    cfe/trunk/test/Index/c-index-api-loadTU-test.m

Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=135273&r1=135272&r2=135273&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original)
+++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Fri Jul 15 10:30:21 2011
@@ -179,6 +179,7 @@
   // Set setter/getter selector name. Needed later.
   PDecl->setGetterName(GetterSel);
   PDecl->setSetterName(SetterSel);
+  ProcessDeclAttributes(S, PDecl, FD.D);
   DC->addDecl(PDecl);
 
   // We need to look in the @interface to see if the @property was

Modified: cfe/trunk/test/Index/c-index-api-loadTU-test.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/c-index-api-loadTU-test.m?rev=135273&r1=135272&r2=135273&view=diff
==============================================================================
--- cfe/trunk/test/Index/c-index-api-loadTU-test.m (original)
+++ cfe/trunk/test/Index/c-index-api-loadTU-test.m Fri Jul 15 10:30:21 2011
@@ -70,6 +70,11 @@
 struct X0;
 struct X0  {};
 
+ at interface TestAttributes()
+// <rdar://problem/9561076>
+ at property (retain) IBOutlet id anotherOutlet;
+ at end
+
 // CHECK: c-index-api-loadTU-test.m:4:12: ObjCInterfaceDecl=Foo:4:12 Extent=[4:1 - 12:5]
 // CHECK: c-index-api-loadTU-test.m:6:32: ObjCIvarDecl=myoutlet:6:32 (Definition) Extent=[6:3 - 6:40]
 // CHECK: <invalid loc>:0:0: attribute(iboutlet)=
@@ -150,3 +155,9 @@
 // CHECK: c-index-api-loadTU-test.m:70:8: StructDecl=X0:70:8 Extent=[70:1 - 70:10]
 // CHECK: c-index-api-loadTU-test.m:71:8: StructDecl=X0:71:8 (Definition) Extent=[71:1 - 71:14]
 
+// CHECK: <invalid loc>:0:0: attribute(iboutlet)=
+// CHECK: c-index-api-loadTU-test.m:75:29: TypeRef=id:0:0 Extent=[75:29 - 75:31]
+// CHECK: c-index-api-loadTU-test.m:75:32: ObjCInstanceMethodDecl=anotherOutlet:75:32 Extent=[75:32 - 75:45]
+// CHECK: c-index-api-loadTU-test.m:75:32: ObjCInstanceMethodDecl=setAnotherOutlet::75:32 Extent=[75:32 - 75:45]
+// CHECK: c-index-api-loadTU-test.m:75:32: ParmDecl=anotherOutlet:75:32 (Definition) Extent=[75:32 - 75:45]
+





More information about the cfe-commits mailing list