[cfe-commits] r64643 - /cfe/trunk/lib/Sema/SemaDeclObjC.cpp

Chris Lattner sabre at nondot.org
Mon Feb 16 10:32:47 PST 2009


Author: lattner
Date: Mon Feb 16 12:32:47 2009
New Revision: 64643

URL: http://llvm.org/viewvc/llvm-project?rev=64643&view=rev
Log:
propagate attributes onto property decls.

Modified:
    cfe/trunk/lib/Sema/SemaDeclObjC.cpp

Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=64643&r1=64642&r2=64643&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Mon Feb 16 12:32:47 2009
@@ -1264,9 +1264,9 @@
     // ProcessPropertyDecl is responsible for diagnosing conflicts with any
     // user-defined setter/getter. It also synthesizes setter/getter methods
     // and adds them to the DeclContext and global method pools.
-    for (ObjCContainerDecl::prop_iterator i = CDecl->prop_begin(),
-                                          e = CDecl->prop_end(); i != e; ++i)
-      ProcessPropertyDecl((*i), CDecl);
+    for (ObjCContainerDecl::prop_iterator I = CDecl->prop_begin(),
+                                          E = CDecl->prop_end(); I != E; ++I)
+      ProcessPropertyDecl(*I, CDecl);
     CDecl->setAtEndLoc(AtEndLoc);
   }
   if (ObjCImplementationDecl *IC=dyn_cast<ObjCImplementationDecl>(ClassDecl)) {
@@ -1276,10 +1276,10 @@
   } else if (ObjCCategoryImplDecl* CatImplClass = 
                                    dyn_cast<ObjCCategoryImplDecl>(ClassDecl)) {
     CatImplClass->setLocEnd(AtEndLoc);
-    ObjCInterfaceDecl* IDecl = CatImplClass->getClassInterface();
+    
     // Find category interface decl and then check that all methods declared
     // in this interface are implemented in the category @implementation.
-    if (IDecl) {
+    if (ObjCInterfaceDecl* IDecl = CatImplClass->getClassInterface()) {
       for (ObjCCategoryDecl *Categories = IDecl->getCategoryList();
            Categories; Categories = Categories->getNextClassCategory()) {
         if (Categories->getIdentifier() == CatImplClass->getIdentifier()) {
@@ -1586,6 +1586,8 @@
   ObjCPropertyDecl *PDecl = ObjCPropertyDecl::Create(Context, DC, AtLoc, 
                                                      FD.D.getIdentifier(), T);
   DC->addDecl(PDecl);
+  
+  ProcessDeclAttributes(PDecl, FD.D);
 
   // Regardless of setter/getter attribute, we save the default getter/setter
   // selector names in anticipation of declaration of setter/getter methods.





More information about the cfe-commits mailing list