summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-04-07 21:25:06 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-04-07 21:25:06 +0000
commit9ecb84bb21edb1c4407fae35e149a307e2ba63ad (patch)
tree96a6483b4777ad60d360880466e75af985ebd614 /clang/lib/Sema/SemaDeclObjC.cpp
parentd18049ab1dd687ebf18af46132120b3131c0baea (diff)
downloadbcm5719-llvm-9ecb84bb21edb1c4407fae35e149a307e2ba63ad.tar.gz
bcm5719-llvm-9ecb84bb21edb1c4407fae35e149a307e2ba63ad.zip
Now that we have __weak defined as attribute in all modes,
we must not issue gc-specific errors in non-gc mode. llvm-svn: 68551
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 17de0a50678..e1583d75b40 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -1825,7 +1825,8 @@ Sema::DeclPtrTy Sema::ActOnPropertyImplDecl(SourceLocation AtLoc,
return DeclPtrTy();
}
// __weak is explicit. So it works on Canonical type.
- if (PropType.isObjCGCWeak() && !IvarType.isObjCGCWeak()) {
+ if (PropType.isObjCGCWeak() && !IvarType.isObjCGCWeak() &&
+ getLangOptions().getGCMode() != LangOptions::NonGC) {
Diag(PropertyLoc, diag::error_weak_property)
<< property->getDeclName() << Ivar->getDeclName();
return DeclPtrTy();
OpenPOWER on IntegriCloud