forked from OSchip/llvm-project
ignore weak_import attribute on objc method decls.
llvm-svn: 70901
This commit is contained in:
parent
71fb950b73
commit
60637985de
|
@ -775,8 +775,8 @@ static void HandleWeakImportAttr(Decl *D, const AttributeList &Attr, Sema &S) {
|
|||
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)
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
// RUN: clang-cc -fsyntax-only -verify %s
|
||||
|
||||
@interface foo
|
||||
+ (void) cx __attribute__((weak_import));
|
||||
- (void) x __attribute__((weak_import));
|
||||
@end
|
||||
|
Loading…
Reference in New Issue