[cfe-commits] r158874 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td test/SemaObjC/default-synthesize-2.m

Douglas Gregor dgregor at apple.com
Fri Jun 29 11:31:08 PDT 2012


On Jun 20, 2012, at 4:33 PM, Fariborz Jahanian <fjahanian at apple.com> wrote:

> Author: fjahanian
> Date: Wed Jun 20 18:33:16 2012
> New Revision: 158874
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=158874&view=rev
> Log:
> objective-c: place quotes around named items in a diagnostic.
> // rdar://11671080

A slightly better way to fix this would be to pass the DeclarationName or IdentifierInfo* to the diagnostic system (rather than passing a string), and it will add the quotes itself.

	- Doug

> Modified:
>    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
>    cfe/trunk/test/SemaObjC/default-synthesize-2.m
> 
> Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=158874&r1=158873&r2=158874&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
> +++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Wed Jun 20 18:33:16 2012
> @@ -631,8 +631,8 @@
>   " declared in a protocol">,
>   InGroup<DiagGroup<"objc-protocol-property-synthesis">>;
> def warn_autosynthesis_property_ivar_match :Warning<
> -  "autosynthesized property %0 will use %select{|synthesized}1 instance variable "
> -  "%2, not existing instance variable %3">,
> +  "autosynthesized property '%0' will use %select{|synthesized}1 instance variable "
> +  "'%2', not existing instance variable '%3'">,
>   InGroup<DiagGroup<"objc-autosynthesis-property-ivar-name-match">>;
> def warn_missing_explicit_synthesis : Warning <
>   "auto property synthesis is synthesizing property not explicitly synthesized">,
> 
> Modified: cfe/trunk/test/SemaObjC/default-synthesize-2.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/default-synthesize-2.m?rev=158874&r1=158873&r2=158874&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaObjC/default-synthesize-2.m (original)
> +++ cfe/trunk/test/SemaObjC/default-synthesize-2.m Wed Jun 20 18:33:16 2012
> @@ -47,7 +47,7 @@
> @end
> 
> // rdar://11671080
> - at implementation Test3 // expected-warning {{autosynthesized property uid will use synthesized instance variable _uid, not existing instance variable uid}}
> + at implementation Test3 // expected-warning {{autosynthesized property 'uid' will use synthesized instance variable '_uid', not existing instance variable 'uid'}}
> // Oops, forgot to write @synthesize! will be default synthesized
> - (void) myMethod { 
>    self.uid = 0; // Use of the “setter” 
> @@ -125,5 +125,5 @@
> @end
> 
> 
> - at implementation Test8 @end // expected-warning {{autosynthesized property y will use  instance variable _y, not existing instance variable y}}
> + at implementation Test8 @end // expected-warning {{autosynthesized property 'y' will use  instance variable '_y', not existing instance variable 'y'}}
> 
> 
> 
> _______________________________________________
> 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