[cfe-commits] r70923 - in /cfe/branches/Apple/Dib: lib/Sema/SemaDeclAttr.cpp test/SemaObjC/ignore-weakimport-method.m

Mike Stump mrs at apple.com
Mon May 4 15:13:42 PDT 2009


Author: mrs
Date: Mon May  4 17:13:42 2009
New Revision: 70923

URL: http://llvm.org/viewvc/llvm-project?rev=70923&view=rev
Log:
Merge in 70901:

ignore weak_import attribute on objc method decls.

Added:
    cfe/branches/Apple/Dib/test/SemaObjC/ignore-weakimport-method.m
      - copied unchanged from r70901, cfe/trunk/test/SemaObjC/ignore-weakimport-method.m
Modified:
    cfe/branches/Apple/Dib/lib/Sema/SemaDeclAttr.cpp

Modified: cfe/branches/Apple/Dib/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/lib/Sema/SemaDeclAttr.cpp?rev=70923&r1=70922&r2=70923&view=diff

==============================================================================
--- cfe/branches/Apple/Dib/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/branches/Apple/Dib/lib/Sema/SemaDeclAttr.cpp Mon May  4 17:13:42 2009
@@ -775,8 +775,8 @@
     isDef = (!VD->hasExternalStorage() || VD->getInit());
   } else if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
     isDef = FD->getBody(S.Context);
-  } else if (isa<ObjCPropertyDecl>(D)) {
-    // We ignore weak import on properties
+  } else if (isa<ObjCPropertyDecl>(D) || isa<ObjCMethodDecl>(D)) {
+    // We ignore weak import on properties and methods
     return;
   } else {
     S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)





More information about the cfe-commits mailing list