]> granicus.if.org Git - clang/commitdiff
Fix another fallout from defining __weak unconditionally.
authorFariborz Jahanian <fjahanian@apple.com>
Fri, 10 Apr 2009 22:42:54 +0000 (22:42 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Fri, 10 Apr 2009 22:42:54 +0000 (22:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68834 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclObjC.cpp
test/SemaObjC/no-gc-weak-test.m

index 898ecbb47168dda197eacfe8a42f05c58142eb1c..74a031643135a8ae4ad5b7360b4382745e4852a5 100644 (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();
index 03a881f589a62fc84cc458a27e22899efd6857a7..f494929ce02dc6d2ed4d6b4a52bd5f90ba1ca8fa 100644 (file)
 @end
 
  
+@interface PVSelectionOverlayView2 
+{
+ id __weak _selectionRect;
+}
+
+@property(assign) id selectionRect;
+
+@end
+
+@implementation PVSelectionOverlayView2
+
+@synthesize selectionRect = _selectionRect;
+@end
+