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)
--- /dev/null
+// RUN: clang-cc -fsyntax-only -verify %s
+
+@interface foo
++ (void) cx __attribute__((weak_import));
+- (void) x __attribute__((weak_import));
+@end
+