Fix another fallout from defining __weak unconditionally.

llvm-svn: 68834
This commit is contained in:
Fariborz Jahanian 2009-04-10 22:42:54 +00:00
parent 8c920c9220
commit 60331be08d
2 changed files with 16 additions and 1 deletions

View File

@ -1840,7 +1840,8 @@ Sema::DeclPtrTy Sema::ActOnPropertyImplDecl(SourceLocation AtLoc,
return DeclPtrTy();
}
if ((Context.isObjCObjectPointerType(property->getType()) ||
PropType.isObjCGCStrong()) && IvarType.isObjCGCWeak()) {
PropType.isObjCGCStrong()) && IvarType.isObjCGCWeak() &&
getLangOptions().getGCMode() != LangOptions::NonGC) {
Diag(PropertyLoc, diag::error_strong_property)
<< property->getDeclName() << Ivar->getDeclName();
return DeclPtrTy();

View File

@ -12,3 +12,17 @@
@end
@interface PVSelectionOverlayView2
{
id __weak _selectionRect;
}
@property(assign) id selectionRect;
@end
@implementation PVSelectionOverlayView2
@synthesize selectionRect = _selectionRect;
@end