forked from OSchip/llvm-project
parent
02537142c1
commit
38cae30095
|
@ -761,6 +761,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();
|
||||
} else if (isa<ObjCPropertyDecl>(D)) {
|
||||
// We ignore weak import on properties
|
||||
} else {
|
||||
S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
|
||||
<< "weak_import" << 2 /*variable and function*/;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
// RUN: clang -triple i386-apple-darwin9 -fsyntax-only -verify %s
|
||||
|
||||
@interface foo
|
||||
@property(nonatomic) int foo __attribute__((weak_import));
|
||||
@end
|
Loading…
Reference in New Issue