[cfe-commits] r102187 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td test/SemaObjC/continuation-class-err.m
Douglas Gregor
dgregor at apple.com
Fri Apr 23 10:40:59 PDT 2010
On Apr 23, 2010, at 10:22 AM, Fariborz Jahanian wrote:
> Author: fjahanian
> Date: Fri Apr 23 12:22:07 2010
> New Revision: 102187
>
> URL: http://llvm.org/viewvc/llvm-project?rev=102187&view=rev
> Log:
> Trying to improve on a diagnostics for properties.
>
>
> Modified:
> cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
> cfe/trunk/test/SemaObjC/continuation-class-err.m
>
> Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=102187&r1=102186&r2=102187&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
> +++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Fri Apr 23 12:22:07 2010
> @@ -323,8 +323,8 @@
> "writable atomic property %0 cannot pair a synthesized setter/getter "
> "with a user defined setter/getter">;
> def err_use_continuation_class : Error<
> - "property declaration in continuation class of %0 is to change a 'readonly' "
> - "property to 'readwrite'">;
> + "illegal declaration of property in continuation class %0"
> + " - attribute must be readwrite, while its primary must be readonly">;
I like this better, with one nit: we usually use a colon or semicolon rather than dash (a colon makes sense in this case).
> def err_continuation_class : Error<"continuation class has no primary class">;
> def err_property_type : Error<"property cannot have array or function type %0">;
> def error_missing_property_context : Error<
>
> Modified: cfe/trunk/test/SemaObjC/continuation-class-err.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/continuation-class-err.m?rev=102187&r1=102186&r2=102187&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaObjC/continuation-class-err.m (original)
> +++ cfe/trunk/test/SemaObjC/continuation-class-err.m Fri Apr 23 12:22:07 2010
> @@ -12,7 +12,7 @@
>
> @interface ReadOnly ()
> @property(readwrite, copy) id object; // expected-warning {{property attribute in continuation class does not match the primary class}}
> - at property(readonly) id object1; // expected-error {{property declaration in continuation class of 'ReadOnly' is to change a 'readonly' property to 'readwrite'}}
> + at property(readonly) id object1; // expected-error {{illegal declaration of property in continuation class 'ReadOnly' - attribute must be}}
> @property (readwrite, assign) int indentLevel; // OK. assign the the default in any case.
> @end
>
> @@ -31,8 +31,8 @@
> @end
>
> @interface Bar ()
> - at property (copy) id foo; // expected-error {{property declaration in continuation class of 'Bar' is to change a 'readonly' property to 'readwrite'}}
> - at property (copy) id fee; // expected-error {{property declaration in continuation class of 'Bar' is to change a 'readonly' property to 'readwrite'}}
> + at property (copy) id foo; // expected-error {{illegal declaration of property in continuation class 'Bar' - attribute must be}}
> + at property (copy) id fee; // expected-error {{illegal declaration of property in continuation class 'Bar' - attribute must be}}
> @end
>
> @implementation Bar
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list