]> granicus.if.org Git - clang/commitdiff
objc: turn warning for property type mismatch in
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 28 Nov 2011 18:38:27 +0000 (18:38 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 28 Nov 2011 18:38:27 +0000 (18:38 +0000)
primary and its continuation class into error.
// rdar://10142679

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145255 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaObjCProperty.cpp
test/SemaObjC/continuation-class-property.m

index e6dd6e86b9de2384afac173e2975f4afda725695..38a7c19a35a85a866c66f8805e59efed22cab5b8 100644 (file)
@@ -123,7 +123,6 @@ def OverloadedVirtual : DiagGroup<"overloaded-virtual">;
 def ObjCMissingSuperCalls : DiagGroup<"objc-missing-super-calls">;
 def ObjCRetainBlockProperty : DiagGroup<"objc-noncopy-retain-block-property">;
 def ObjCReadonlyPropertyHasSetter : DiagGroup<"objc-readonly-with-setter-property">;
-def ObjCContinuationPropertyType :DiagGroup<"objc-continuation-property-type">;
 def Packed : DiagGroup<"packed">;
 def Padded : DiagGroup<"padded">;
 def PointerArith : DiagGroup<"pointer-arith">;
index 6a5cd229302f8c03aeed86576fd969428fdf452e..f566e10894e552cbef9f9afebcabdc5a2ec9d0a4 100644 (file)
@@ -539,9 +539,9 @@ def warn_default_atomic_custom_getter_setter : Warning<
 def err_use_continuation_class : Error<
   "illegal redeclaration of property in continuation class %0"
   " (attribute must be 'readwrite', while its primary must be 'readonly')">;
-def warn_type_mismatch_continuation_class : Warning<
+def err_type_mismatch_continuation_class : Error<
   "type of property %0 in continuation class does not match "
-  "property type in primary class">, InGroup<ObjCContinuationPropertyType>;
+  "property type in primary class">;
 def err_use_continuation_class_redeclaration_readwrite : Error<
   "illegal redeclaration of 'readwrite' property in continuation class %0"
   " (perhaps you intended this to be a 'readwrite' redeclaration of a "
index 90d2d93431537b47b36faf414e26ca443746b911..c47a305b9672dffcf1c1293a5fe4467e00b0dc16 100644 (file)
@@ -279,7 +279,7 @@ Sema::HandlePropertyInClassExtension(Scope *S,
   if (PIDecl->getType().getCanonicalType() 
       != PDecl->getType().getCanonicalType()) {
     Diag(AtLoc, 
-         diag::warn_type_mismatch_continuation_class) << PDecl->getType();
+         diag::err_type_mismatch_continuation_class) << PDecl->getType();
     Diag(PIDecl->getLocation(), diag::note_property_declare);
   }
     
index a579184060b79496c44dfabd9a3ee3463a6d381d..d017ac23dced2f29f8ada347ac056fe26ef67c68 100644 (file)
@@ -38,6 +38,6 @@ typedef struct {
 @end
 
 @interface MyClass ()
-@property (readwrite) NSString *foo; // expected-warning {{type of property 'NSString *' in continuation class does not match property type in primary class}}
-@property (readwrite, strong) NSRect bar; // expected-warning {{type of property 'NSRect' in continuation class does not match property type in primary class}}
+@property (readwrite) NSString *foo; // expected-error {{type of property 'NSString *' in continuation class does not match property type in primary class}}
+@property (readwrite, strong) NSRect bar; // expected-error {{type of property 'NSRect' in continuation class does not match property type in primary class}}
 @end