[cfe-commits] r71267 - in /cfe/trunk: lib/Sema/SemaDeclObjC.cpp test/SemaObjC/property-typecheck-1.m
Fariborz Jahanian
fjahanian at apple.com
Fri May 8 14:10:06 PDT 2009
Author: fjahanian
Date: Fri May 8 16:10:00 2009
New Revision: 71267
URL: http://llvm.org/viewvc/llvm-project?rev=71267&view=rev
Log:
Fixes a bug in my last patch. Order of types reversed.
Modified:
cfe/trunk/lib/Sema/SemaDeclObjC.cpp
cfe/trunk/test/SemaObjC/property-typecheck-1.m
Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=71267&r1=71266&r2=71267&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Fri May 8 16:10:00 2009
@@ -26,8 +26,7 @@
GetterMethod->getResultType() != property->getType()) {
AssignConvertType result = Incompatible;
if (Context.isObjCObjectPointerType(property->getType()))
- result = CheckAssignmentConstraints(property->getType(),
- GetterMethod->getResultType());
+ result = CheckAssignmentConstraints(GetterMethod->getResultType(), property->getType());
if (result != Compatible) {
Diag(Loc, diag::warn_accessor_property_type_mismatch)
<< property->getDeclName()
Modified: cfe/trunk/test/SemaObjC/property-typecheck-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-typecheck-1.m?rev=71267&r1=71266&r2=71267&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/property-typecheck-1.m (original)
+++ cfe/trunk/test/SemaObjC/property-typecheck-1.m Fri May 8 16:10:00 2009
@@ -73,11 +73,11 @@
NSArray* first;
}
- at property (readonly) NSArray* pieces;
- at property (readonly) NSMutableArray* first; // expected-warning {{type of property 'first' does not match type of accessor 'first'}}
+ at property (readonly) NSArray* pieces; // expected-warning {{type of property 'pieces' does not match type of accessor 'pieces'}}
+ at property (readonly) NSMutableArray* first;
-- (NSMutableArray*) pieces;
-- (NSArray*) first; // expected-note {{declared at}} // expected-note {{declared at}}
+- (NSMutableArray*) pieces; // expected-note {{declared at}} // expected-note {{declared at}}
+- (NSArray*) first;
@end
@interface Class2 {
@@ -90,12 +90,12 @@
- (id) lastPiece
{
- return container.pieces;
+ return container.pieces; // expected-warning {{type of property 'pieces' does not match type of accessor 'pieces'}}
}
- (id)firstPeice
{
- return container.first; // expected-warning {{type of property 'first' does not match type of accessor 'first'}}
+ return container.first;
}
@end
More information about the cfe-commits
mailing list