Author: fjahanian
Date: Mon Aug 1 17:39:49 2011
New Revision: 136658
URL: http://llvm.org/viewvc/llvm-project?rev=136658&view=rev
Log:
objective-c: reverse patch for // rdar://9818354
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/lib/Sema/SemaObjCProperty.cpp
cfe/trunk/test/ARCMT/remove-dealloc-zerouts.m
cfe/trunk/test/ARCMT/remove-dealloc-zerouts.m.result
cfe/trunk/test/SemaObjC/arc.m
cfe/trunk/test/SemaObjC/atomoic-property-synnthesis-rules.m
cfe/trunk/test/SemaObjC/conflict-nonfragile-abi2.m
cfe/trunk/test/SemaObjC/default-synthesize.m
cfe/trunk/test/SemaObjC/property-ns-returns-not-retained-attr.m
cfe/trunk/test/SemaObjC/provisional-ivar-lookup.m
cfe/trunk/test/SemaObjC/synth-provisional-ivars.m
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=136658&r1=136657&r2=136658&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Mon Aug 1 17:39:49
2011
@@ -472,10 +472,6 @@
def err_property_type : Error<"property cannot have array or function type
%0">;
def error_missing_property_context : Error<
"missing context for property implementation declaration">;
-def error_property_after_method_impl : Error<
- "property implementation declaration after method or function definition">;
-def warn_property_after_method_impl : Warning<
- "property implementation declaration after method or function definition">;
def error_bad_property_decl : Error<
"property implementation must have its declaration in interface %0">;
def error_category_property : Error<
Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=136658&r1=136657&r2=136658&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original)
+++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Mon Aug 1 17:39:49 2011
@@ -555,14 +555,6 @@
return 0;
}
}
- if ((IC->meth_begin() != IC->meth_end()) && AtLoc.isValid()) {
- if (getLangOptions().ObjCAutoRefCount)
- Diag(AtLoc, diag::error_property_after_method_impl);
- else
- Diag(AtLoc, diag::warn_property_after_method_impl);
- ObjCMethodDecl *method = *(IC->meth_begin());
- Diag(method->getLocation(), diag::note_method_declared_at);
- }
} else if ((CatImplClass = dyn_cast<ObjCCategoryImplDecl>(ClassImpDecl))) {
if (Synthesize) {
Diag(AtLoc, diag::error_synthesize_category_decl);
Modified: cfe/trunk/test/ARCMT/remove-dealloc-zerouts.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/remove-dealloc-zerouts.m?rev=136658&r1=136657&r2=136658&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/remove-dealloc-zerouts.m (original)
+++ cfe/trunk/test/ARCMT/remove-dealloc-zerouts.m Mon Aug 1 17:39:49 2011
@@ -34,11 +34,11 @@
@end
@implementation Bar
-@synthesize a;
- (void) dealloc {
[self setA:0]; // This is user-defined setter overriding synthesize, don't
touch it.
self.a.x = 0; // every dealloc must zero out its own ivar. This patter is
not recognized.
}
+@synthesize a;
- (void) setA:(Foo*) val { }
- (id) a {return 0;}
@end
Modified: cfe/trunk/test/ARCMT/remove-dealloc-zerouts.m.result
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/remove-dealloc-zerouts.m.result?rev=136658&r1=136657&r2=136658&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/remove-dealloc-zerouts.m.result (original)
+++ cfe/trunk/test/ARCMT/remove-dealloc-zerouts.m.result Mon Aug 1 17:39:49
2011
@@ -29,11 +29,11 @@
@end
@implementation Bar
-@synthesize a;
- (void) dealloc {
[self setA:0]; // This is user-defined setter overriding synthesize, don't
touch it.
self.a.x = 0; // every dealloc must zero out its own ivar. This patter is
not recognized.
}
+@synthesize a;
- (void) setA:(Foo*) val { }
- (id) a {return 0;}
@end
Modified: cfe/trunk/test/SemaObjC/arc.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc.m?rev=136658&r1=136657&r2=136658&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/arc.m (original)
+++ cfe/trunk/test/SemaObjC/arc.m Mon Aug 1 17:39:49 2011
@@ -614,9 +614,9 @@
@synthesize newName;
@synthesize newName1;
-- (id) newName1 { return 0; } // expected-note {{method declared here}}
+- (id) newName1 { return 0; }
-@synthesize newName2; // expected-error {{property implementation declaration
after method or function definition}}
+@synthesize newName2;
@end
void test35(void) {
Modified: cfe/trunk/test/SemaObjC/atomoic-property-synnthesis-rules.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/atomoic-property-synnthesis-rules.m?rev=136658&r1=136657&r2=136658&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/atomoic-property-synnthesis-rules.m (original)
+++ cfe/trunk/test/SemaObjC/atomoic-property-synnthesis-rules.m Mon Aug 1
17:39:49 2011
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-// XFAIL: *
/*
Conditions for warning:
Modified: cfe/trunk/test/SemaObjC/conflict-nonfragile-abi2.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/conflict-nonfragile-abi2.m?rev=136658&r1=136657&r2=136658&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/conflict-nonfragile-abi2.m (original)
+++ cfe/trunk/test/SemaObjC/conflict-nonfragile-abi2.m Mon Aug 1 17:39:49 2011
@@ -15,13 +15,8 @@
// rdar://9027673
// Warning on future name lookup rule is removed.
@implementation I
-@synthesize glob;
-@dynamic p;
-@dynamic le;
-@dynamic l;
-@dynamic ls;
-@dynamic r;
- (int) Meth { return glob; } // no warning
+@synthesize glob;
// rdar://8248681
- (int) Meth1: (int) p {
extern int le;
@@ -31,6 +26,11 @@
p = le + ls + r;
return l;
}
+@dynamic p;
+@dynamic le;
+@dynamic l;
+@dynamic ls;
+@dynamic r;
@end
Modified: cfe/trunk/test/SemaObjC/default-synthesize.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/default-synthesize.m?rev=136658&r1=136657&r2=136658&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/default-synthesize.m (original)
+++ cfe/trunk/test/SemaObjC/default-synthesize.m Mon Aug 1 17:39:49 2011
@@ -111,7 +111,7 @@
@end
@implementation D
-@synthesize PROP=IVAR;
- (int) Meth { return self.PROP; }
+@synthesize PROP=IVAR;
@end
Modified: cfe/trunk/test/SemaObjC/property-ns-returns-not-retained-attr.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-ns-returns-not-retained-attr.m?rev=136658&r1=136657&r2=136658&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/property-ns-returns-not-retained-attr.m (original)
+++ cfe/trunk/test/SemaObjC/property-ns-returns-not-retained-attr.m Mon Aug 1
17:39:49 2011
@@ -15,7 +15,7 @@
@synthesize newName;
@synthesize newName1;
-@synthesize newName2;
- (id) newName1 { return 0; }
+@synthesize newName2;
@end
Modified: cfe/trunk/test/SemaObjC/provisional-ivar-lookup.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/provisional-ivar-lookup.m?rev=136658&r1=136657&r2=136658&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/provisional-ivar-lookup.m (original)
+++ cfe/trunk/test/SemaObjC/provisional-ivar-lookup.m Mon Aug 1 17:39:49 2011
@@ -15,7 +15,7 @@
@synthesize foo = _foo;
@synthesize foo1;
-- (void)setFoo:(int)value { // expected-note 3 {{method declared here}}
+- (void)setFoo:(int)value {
_foo = foo; // expected-error {{use of undeclared identifier 'foo'}}
}
@@ -31,10 +31,10 @@
_foo = foo3; // OK
}
-@synthesize foo2 = _foo2; // expected-warning {{property implementation
declaration after method or function definition}}
-@synthesize foo3; // expected-warning {{property implementation declaration
after method or function definition}}
+@synthesize foo2 = _foo2;
+@synthesize foo3;
-@synthesize PROP=PROP; // expected-warning {{property implementation
declaration after method or function definition}}
+@synthesize PROP=PROP;
- (void)setPROP:(int)value {
PROP = PROP; // OK
}
Modified: cfe/trunk/test/SemaObjC/synth-provisional-ivars.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/synth-provisional-ivars.m?rev=136658&r1=136657&r2=136658&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/synth-provisional-ivars.m (original)
+++ cfe/trunk/test/SemaObjC/synth-provisional-ivars.m Mon Aug 1 17:39:49 2011
@@ -18,23 +18,22 @@
@end
@implementation I
-- (int) Meth { return PROP; } // expected-note 2{{'PROP' declared here}} \
- // expected-note 5{{method declared here}}
+- (int) Meth { return PROP; } // expected-note 2{{'PROP' declared here}}
-@dynamic PROP1; // expected-warning {{property implementation declaration
after method or function definition}}
+@dynamic PROP1;
- (int) Meth1 { return PROP1; } // expected-error {{use of undeclared
identifier 'PROP1'}}
- (int) Meth2 { return PROP2; } // expected-error {{use of undeclared
identifier 'PROP2'}}
-@dynamic PROP2; // expected-warning {{property implementation declaration
after method or function definition}}
+@dynamic PROP2;
- (int) Meth3 { return PROP3; } // expected-error {{use of undeclared
identifier 'PROP3'}}
-@synthesize PROP3=IVAR; // expected-warning {{property implementation
declaration after method or function definition}}
+@synthesize PROP3=IVAR;
- (int) Meth4 { return PROP4; }
-@synthesize PROP4=PROP4; // expected-warning {{property implementation
declaration after method or function definition}}
+@synthesize PROP4=PROP4;
- (int) Meth5 { return bar; } // expected-error {{use of undeclared
identifier 'bar'}}
-@synthesize bar = _bar; // expected-warning {{property implementation
declaration after method or function definition}}
+@synthesize bar = _bar;
- (int) Meth6 { return bar1; }
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits