[llvm-branch-commits] [cfe-branch] r195224 - Merging r195146:
Bill Wendling
isanbard at gmail.com
Tue Nov 19 22:43:12 PST 2013
Author: void
Date: Wed Nov 20 00:43:12 2013
New Revision: 195224
URL: http://llvm.org/viewvc/llvm-project?rev=195224&view=rev
Log:
Merging r195146:
------------------------------------------------------------------------
r195146 | fjahanian | 2013-11-19 11:26:30 -0800 (Tue, 19 Nov 2013) | 4 lines
ObjectiveC ARC. Removes a bogus warning when a weak
property is redeclared as 'weak' in class extension.
// rdar://15465916
------------------------------------------------------------------------
Modified:
cfe/branches/release_34/ (props changed)
cfe/branches/release_34/lib/Sema/SemaObjCProperty.cpp
cfe/branches/release_34/test/SemaObjC/arc-decls.m
Propchange: cfe/branches/release_34/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Nov 20 00:43:12 2013
@@ -1,4 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:195126,195128,195135-195136,195158,195163
+/cfe/trunk:195126,195128,195135-195136,195146,195158,195163
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_34/lib/Sema/SemaObjCProperty.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_34/lib/Sema/SemaObjCProperty.cpp?rev=195224&r1=195223&r2=195224&view=diff
==============================================================================
--- cfe/branches/release_34/lib/Sema/SemaObjCProperty.cpp (original)
+++ cfe/branches/release_34/lib/Sema/SemaObjCProperty.cpp Wed Nov 20 00:43:12 2013
@@ -463,10 +463,12 @@ Sema::HandlePropertyInClassExtension(Sco
QualType PrimaryPropertyQT =
Context.getCanonicalType(PIDecl->getType()).getUnqualifiedType();
if (isa<ObjCObjectPointerType>(PrimaryPropertyQT)) {
+ bool PropertyIsWeak = ((PIkind & ObjCPropertyDecl::OBJC_PR_weak) != 0);
Qualifiers::ObjCLifetime PrimaryPropertyLifeTime =
PrimaryPropertyQT.getObjCLifetime();
if (PrimaryPropertyLifeTime == Qualifiers::OCL_None &&
- (Attributes & ObjCDeclSpec::DQ_PR_weak)) {
+ (Attributes & ObjCDeclSpec::DQ_PR_weak) &&
+ !PropertyIsWeak) {
Diag(AtLoc, diag::warn_property_implicitly_mismatched);
Diag(PIDecl->getLocation(), diag::note_property_declare);
}
Modified: cfe/branches/release_34/test/SemaObjC/arc-decls.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_34/test/SemaObjC/arc-decls.m?rev=195224&r1=195223&r2=195224&view=diff
==============================================================================
--- cfe/branches/release_34/test/SemaObjC/arc-decls.m (original)
+++ cfe/branches/release_34/test/SemaObjC/arc-decls.m Wed Nov 20 00:43:12 2013
@@ -113,8 +113,13 @@ struct __attribute__((objc_ownership(non
@interface SomeClassOwnedByController
@property (readonly) ControllerClass *controller; // expected-note {{property declared here}}
+
+// rdar://15465916
+ at property (readonly, weak) ControllerClass *weak_controller;
@end
@interface SomeClassOwnedByController ()
@property (readwrite, weak) ControllerClass *controller; // expected-warning {{primary property declaration is implicitly strong while redeclaration in class extension is weak}}
+
+ at property (readwrite, weak) ControllerClass *weak_controller;
@end
More information about the llvm-branch-commits
mailing list