[cfe-commits] r100873 - in /cfe/trunk: include/clang/Basic/ test/FixIt/ test/PCH/ test/Sema/ test/SemaObjC/

Douglas Gregor dgregor at apple.com
Fri Apr 9 10:53:29 PDT 2010


Author: dgregor
Date: Fri Apr  9 12:53:29 2010
New Revision: 100873

URL: http://llvm.org/viewvc/llvm-project?rev=100873&view=rev
Log:
Improve diagnostics like "initializing <type> from an expression of
type..." with "initializing <type> with an expression of type...",
which reads better. Thanks to John for the improved wording.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/test/FixIt/fixit-objc.m
    cfe/trunk/test/PCH/types.c
    cfe/trunk/test/Sema/anonymous-struct-union.c
    cfe/trunk/test/Sema/array-init.c
    cfe/trunk/test/Sema/block-call.c
    cfe/trunk/test/Sema/block-return.c
    cfe/trunk/test/Sema/cast-to-union.c
    cfe/trunk/test/Sema/compound-literal.c
    cfe/trunk/test/Sema/enum.c
    cfe/trunk/test/Sema/invalid-init-diag.c
    cfe/trunk/test/Sema/predef.c
    cfe/trunk/test/Sema/struct-compat.c
    cfe/trunk/test/Sema/warn-write-strings.c
    cfe/trunk/test/SemaObjC/comptypes-6.m
    cfe/trunk/test/SemaObjC/conditional-expr-3.m
    cfe/trunk/test/SemaObjC/conditional-expr-4.m
    cfe/trunk/test/SemaObjC/message.m
    cfe/trunk/test/SemaObjC/warn-write-strings.m

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Fri Apr  9 12:53:29 2010
@@ -2233,38 +2233,38 @@
   " %0 "
   "%select{from incompatible type|to parameter of incompatible type|"
   "from a function with incompatible result type|to incompatible type|"
-  "from an expression of incompatible type|to parameter of incompatible type|"
+  "with an expression of incompatible type|to parameter of incompatible type|"
   "to incompatible type}2 %1">;
 def warn_incompatible_qualified_id : Warning<
   "%select{assigning to|passing|returning|converting|initializing|sending|casting}2"
   " %0 "
   "%select{from incompatible type|to parameter of incompatible type|"
   "from a function with incompatible result type|to incompatible type|"
-  "from an expression of incompatible type|to parameter of incompatible type|"
+  "with an expression of incompatible type|to parameter of incompatible type|"
   "to incompatible type}2 %1">;
 def ext_typecheck_convert_pointer_int : ExtWarn<
   "incompatible pointer to integer conversion "
   "%select{assigning to|passing|returning|converting|initializing|sending|casting}2"
   " %0 "
   "%select{from|to parameter of type|from a function with result type|to type|"
-  "from an expression of type|to parameter of type|to type}2 %1">;
+  "with an expression of type|to parameter of type|to type}2 %1">;
 def ext_typecheck_convert_int_pointer : ExtWarn<
   "incompatible integer to pointer conversion "
   "%select{assigning to|passing|returning|converting|initializing|sending|casting}2"
   " %0 "
   "%select{from|to parameter of type|from a function with result type|to type|"
-  "from an expression of type|to parameter of type|to type}2 %1">;
+  "with an expression of type|to parameter of type|to type}2 %1">;
 def ext_typecheck_convert_pointer_void_func : Extension<
   "%select{assigning to|passing|returning|converting|initializing|sending|casting}2"
   " %0 "
   "%select{from|to parameter of type|from a function with result type|to type|"
-  "from an expression of type|to parameter of type|to type}2 %1 "
+  "with an expression of type|to parameter of type|to type}2 %1 "
   "converts between void pointer and function pointer">;
 def ext_typecheck_convert_incompatible_pointer_sign : ExtWarn<
   "%select{assigning to|passing|returning|converting|initializing|sending|casting}2"
   " %0 "
   "%select{from|to parameter of type|from a function with result type|to type|"
-  "from an expression of type|to parameter of type|to type}2 %1 "
+  "with an expression of type|to parameter of type|to type}2 %1 "
   "converts between pointers to integer types with different sign">,
   InGroup<DiagGroup<"pointer-sign">>;
 def ext_typecheck_convert_incompatible_pointer : ExtWarn<
@@ -2272,38 +2272,38 @@
   "%select{assigning to|passing|returning|converting|initializing|sending|casting}2"
   " %0 "
   "%select{from|to parameter of type|from a function with result type|to type|"
-  "from an expression of type|to parameter of type|to type}2 %1">;
+  "with an expression of type|to parameter of type|to type}2 %1">;
 def ext_typecheck_convert_discards_qualifiers : ExtWarn<
   "%select{assigning to|passing|returning|converting|initializing|sending|casting}2"
   " %0 "
   "%select{from|to parameter of type|from a function with result type|to type|"
-  "from an expression of type|to parameter of type|to type}2 %1 discards "
+  "with an expression of type|to parameter of type|to type}2 %1 discards "
   "qualifiers">;
 def ext_nested_pointer_qualifier_mismatch : ExtWarn<
   "%select{assigning to|passing|returning|converting|initializing|sending|casting}2"
   " %0 "
   "%select{from|to parameter of type|from a function with result type|to type|"
-  "from an expression of type|to parameter of type|to type}2 %1 discards "
+  "with an expression of type|to parameter of type|to type}2 %1 discards "
   "qualifiers in nested pointer types">;
 def warn_incompatible_vectors : Warning<
   "incompatible vector types "
   "%select{assigning to|passing|returning|converting|initializing|sending|casting}2"
   " %0 "
   "%select{from|to parameter of type|from a function with result type|to type|"
-  "from an expression of type|to parameter of type|to type}2 %1">,
+  "with an expression of type|to parameter of type|to type}2 %1">,
   InGroup<VectorConversions>, DefaultIgnore;
 def err_int_to_block_pointer : Error<
   "invalid block pointer conversion "
   "%select{assigning to|passing|returning|converting|initializing|sending|casting}2"
   " %0 "
   "%select{from|to parameter of type|from a function with result type|to type|"
-  "from an expression of type|to parameter of type|to type}2 %1">;
+  "with an expression of type|to parameter of type|to type}2 %1">;
 def err_typecheck_convert_incompatible_block_pointer : Error<
   "incompatible block pointer types "
   "%select{assigning to|passing|returning|converting|initializing|sending|casting}2"
   " %0 "
   "%select{from|to parameter of type|from a function with result type|to type|"
-  "from an expression of type|to parameter of type|to type}2 %1">;
+  "with an expression of type|to parameter of type|to type}2 %1">;
   
 def err_typecheck_convert_ambiguous : Error<
   "ambiguity in initializing value of type %0 with initializer of type %1">;

Modified: cfe/trunk/test/FixIt/fixit-objc.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/FixIt/fixit-objc.m?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/FixIt/fixit-objc.m (original)
+++ cfe/trunk/test/FixIt/fixit-objc.m Fri Apr  9 12:53:29 2010
@@ -27,7 +27,7 @@
 void f(Test *t) {
   NSString *a = "Foo";
   id b = "Foo";
-  A* c = "Foo"; // expected-warning {{incompatible pointer types initializing 'A *' from an expression of type 'char [4]'}}
+  A* c = "Foo"; // expected-warning {{incompatible pointer types initializing 'A *' with an expression of type 'char [4]'}}
   g("Foo");
   h("Foo");
   h(("Foo"));

Modified: cfe/trunk/test/PCH/types.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/types.c?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/PCH/types.c (original)
+++ cfe/trunk/test/PCH/types.c Fri Apr  9 12:53:29 2010
@@ -66,7 +66,7 @@
 // TYPE_TYPEOF_EXPR
 typeof_17 *t17 = &int_value;
 struct S { int x, y; };
-typeof_17 t17_2 = (struct S){1, 2}; // expected-error{{initializing 'typeof_17' (aka 'int') from an expression of incompatible type 'struct S'}}
+typeof_17 t17_2 = (struct S){1, 2}; // expected-error{{initializing 'typeof_17' (aka 'int') with an expression of incompatible type 'struct S'}}
 
 // TYPE_TYPEOF
 int_ptr_ptr2 ipp2 = &int_value_ptr;

Modified: cfe/trunk/test/Sema/anonymous-struct-union.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/anonymous-struct-union.c?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/Sema/anonymous-struct-union.c (original)
+++ cfe/trunk/test/Sema/anonymous-struct-union.c Fri Apr  9 12:53:29 2010
@@ -101,4 +101,4 @@
 typedef struct {
   int x;
 } a_struct;
-int tmp = (a_struct) { .x = 0 }; // expected-error {{initializing 'int' from an expression of incompatible type 'a_struct'}}
+int tmp = (a_struct) { .x = 0 }; // expected-error {{initializing 'int' with an expression of incompatible type 'a_struct'}}

Modified: cfe/trunk/test/Sema/array-init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/array-init.c?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/Sema/array-init.c (original)
+++ cfe/trunk/test/Sema/array-init.c Fri Apr  9 12:53:29 2010
@@ -9,7 +9,7 @@
 
 extern int fileScopeExtern[3] = { 1, 3, 5 }; // expected-warning{{'extern' variable has an initializer}}
 
-static long ary3[] = { 1, "abc", 3, 4 }; // expected-warning{{incompatible pointer to integer conversion initializing 'long' from an expression of type 'char [4]'}}
+static long ary3[] = { 1, "abc", 3, 4 }; // expected-warning{{incompatible pointer to integer conversion initializing 'long' with an expression of type 'char [4]'}}
 
 void func() {
   int x = 1;
@@ -44,11 +44,11 @@
     int a,b,c;
   } z = { 1 };
 
-  struct threeElements *p = 7; // expected-warning{{incompatible integer to pointer conversion initializing 'struct threeElements *' from an expression of type 'int'}}
+  struct threeElements *p = 7; // expected-warning{{incompatible integer to pointer conversion initializing 'struct threeElements *' with an expression of type 'int'}}
   
   extern int blockScopeExtern[3] = { 1, 3, 5 }; // expected-error{{'extern' variable cannot have an initializer}}
   
-  static long x2[3] = { 1.0, "abc" , 5.8 }; // expected-warning{{incompatible pointer to integer conversion initializing 'long' from an expression of type 'char [4]'}}
+  static long x2[3] = { 1.0, "abc" , 5.8 }; // expected-warning{{incompatible pointer to integer conversion initializing 'long' with an expression of type 'char [4]'}}
 }
 
 void test() {
@@ -155,10 +155,10 @@
   char c[] = { "Hello" };
   int l[sizeof(c) == 6 ? 1 : -1];
   
-  int i[] = { "Hello "}; // expected-warning{{incompatible pointer to integer conversion initializing 'int' from an expression of type 'char [7]'}}
+  int i[] = { "Hello "}; // expected-warning{{incompatible pointer to integer conversion initializing 'int' with an expression of type 'char [7]'}}
   char c2[] = { "Hello", "Good bye" }; //expected-warning{{excess elements in char array initializer}}
 
-  int i2[1] = { "Hello" }; //expected-warning{{incompatible pointer to integer conversion initializing 'int' from an expression of type 'char [6]'}}
+  int i2[1] = { "Hello" }; //expected-warning{{incompatible pointer to integer conversion initializing 'int' with an expression of type 'char [6]'}}
   char c3[5] = { "Hello" };
   char c4[4] = { "Hello" }; //expected-warning{{initializer-string for char array is too long}}
 
@@ -191,12 +191,12 @@
 struct s1 {char a; char b;} t1;
 struct s2 {struct s1 c;} t2 = { t1 };
 // The following is a less than great diagnostic (though it's on par with EDG).
-struct s1 t3[] = {t1, t1, "abc", 0}; //expected-warning{{incompatible pointer to integer conversion initializing 'char' from an expression of type 'char [4]'}}
+struct s1 t3[] = {t1, t1, "abc", 0}; //expected-warning{{incompatible pointer to integer conversion initializing 'char' with an expression of type 'char [4]'}}
 int t4[sizeof t3 == 6 ? 1 : -1];
 }
 struct foo { int z; } w;
 int bar (void) { 
-  struct foo z = { w }; //expected-error{{initializing 'int' from an expression of incompatible type 'struct foo'}}
+  struct foo z = { w }; //expected-error{{initializing 'int' with an expression of incompatible type 'struct foo'}}
   return z.z; 
 } 
 struct s3 {void (*a)(void);} t5 = {autoStructTest};

Modified: cfe/trunk/test/Sema/block-call.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/block-call.c?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/Sema/block-call.c (original)
+++ cfe/trunk/test/Sema/block-call.c Fri Apr  9 12:53:29 2010
@@ -13,7 +13,7 @@
   int (^IFP) () = PFR; // OK
 
 
-  const int (^CIC) () = IFP; // expected-error {{incompatible block pointer types initializing 'int const (^)()' from an expression of type 'int (^)()'}}
+  const int (^CIC) () = IFP; // expected-error {{incompatible block pointer types initializing 'int const (^)()' with an expression of type 'int (^)()'}}
 
   const int (^CICC) () = CIC;
 
@@ -21,7 +21,7 @@
 
   int * const (^IPCC1) () = IPCC;
 
-  int * (^IPCC2) () = IPCC;       // expected-error {{incompatible block pointer types initializing 'int *(^)()' from an expression of type 'int *const (^)()'}}
+  int * (^IPCC2) () = IPCC;       // expected-error {{incompatible block pointer types initializing 'int *(^)()' with an expression of type 'int *const (^)()'}}
 
   int (^IPCC3) (const int) = PFR;
 
@@ -29,14 +29,14 @@
 
   int (^IPCC5) (int, char (^CArg) (double)) = IPCC4;
 
-  int (^IPCC6) (int, char (^CArg) (float))  = IPCC4; // expected-error {{incompatible block pointer types initializing 'int (^)(int, char (^)(float))' from an expression of type 'int (^)(int, char (^)(double))'}}
+  int (^IPCC6) (int, char (^CArg) (float))  = IPCC4; // expected-error {{incompatible block pointer types initializing 'int (^)(int, char (^)(float))' with an expression of type 'int (^)(int, char (^)(double))'}}
 
   IPCC2 = 0;
   IPCC2 = 1; // expected-error {{invalid block pointer conversion assigning to 'int *(^)()' from 'int'}}
   int (^x)() = 0;
-  int (^y)() = 3;   // expected-error {{invalid block pointer conversion initializing 'int (^)()' from an expression of type 'int'}}
+  int (^y)() = 3;   // expected-error {{invalid block pointer conversion initializing 'int (^)()' with an expression of type 'int'}}
   int a = 1;
-  int (^z)() = a+4;   // expected-error {{invalid block pointer conversion initializing 'int (^)()' from an expression of type 'int'}}
+  int (^z)() = a+4;   // expected-error {{invalid block pointer conversion initializing 'int (^)()' with an expression of type 'int'}}
 }
 
 int blah() {

Modified: cfe/trunk/test/Sema/block-return.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/block-return.c?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/Sema/block-return.c (original)
+++ cfe/trunk/test/Sema/block-return.c Fri Apr  9 12:53:29 2010
@@ -4,7 +4,7 @@
 
 CL foo() {
   short y;
-  short (^add1)(void) = ^{ return y+1; }; // expected-error {{incompatible block pointer types initializing 'short (^)(void)' from an expression of type 'int (^)(void)'}}
+  short (^add1)(void) = ^{ return y+1; }; // expected-error {{incompatible block pointer types initializing 'short (^)(void)' with an expression of type 'int (^)(void)'}}
 
   CL X = ^{
     if (2)
@@ -26,7 +26,7 @@
       return (char*)0;
   };
 
-  double (^A)(void) = ^ { // expected-error {{incompatible block pointer types initializing 'double (^)(void)' from an expression of type 'float (^)(void)'}}
+  double (^A)(void) = ^ { // expected-error {{incompatible block pointer types initializing 'double (^)(void)' with an expression of type 'float (^)(void)'}}
     if (1)
       return (float)1.0;
     else
@@ -78,8 +78,8 @@
 }
 void next();
 void foo4() {
-  int (^xx)(const char *s) = ^(char *s) { return 1; }; // expected-error {{incompatible block pointer types initializing 'int (^)(char const *)' from an expression of type 'int (^)(char *)'}}
-  int (*yy)(const char *s) = funk; // expected-warning {{incompatible pointer types initializing 'int (*)(char const *)' from an expression of type 'int (char *)'}}
+  int (^xx)(const char *s) = ^(char *s) { return 1; }; // expected-error {{incompatible block pointer types initializing 'int (^)(char const *)' with an expression of type 'int (^)(char *)'}}
+  int (*yy)(const char *s) = funk; // expected-warning {{incompatible pointer types initializing 'int (*)(char const *)' with an expression of type 'int (char *)'}}
   
   int (^nested)(char *s) = ^(char *str) { void (^nest)(void) = ^(void) { printf("%s\n", str); }; next(); return 1; }; // expected-warning{{implicitly declaring C library function 'printf' with type 'int (char const *, ...)'}} \
   // expected-note{{please include the header <stdio.h> or explicitly provide a declaration for 'printf'}}
@@ -109,7 +109,7 @@
 
 void foo7()
 {
- const int (^BB) (void) = ^{ const int i = 1; return i; }; // expected-error{{incompatible block pointer types initializing 'int const (^)(void)' from an expression of type 'int (^)(void)'}}
+ const int (^BB) (void) = ^{ const int i = 1; return i; }; // expected-error{{incompatible block pointer types initializing 'int const (^)(void)' with an expression of type 'int (^)(void)'}}
  const int (^CC) (void)  = ^const int{ const int i = 1; return i; }; // OK
 
   int i;

Modified: cfe/trunk/test/Sema/cast-to-union.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/cast-to-union.c?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/Sema/cast-to-union.c (original)
+++ cfe/trunk/test/Sema/cast-to-union.c Fri Apr  9 12:53:29 2010
@@ -10,7 +10,7 @@
 
 union u w = (union u)2; // expected-warning {{C99 forbids casts to union type}}
 union u ww = (union u)1.0; // expected-error{{cast to union type from type 'double' not present in union}}
-union u x = 7; // expected-error{{initializing 'union u' from an expression of incompatible type 'int'}}
+union u x = 7; // expected-error{{initializing 'union u' with an expression of incompatible type 'int'}}
 int i;
 union u zz = (union u)i; // expected-error{{initializer element is not a compile-time constant}}  expected-warning {{C99 forbids casts to union type}}
 

Modified: cfe/trunk/test/Sema/compound-literal.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/compound-literal.c?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/Sema/compound-literal.c (original)
+++ cfe/trunk/test/Sema/compound-literal.c Fri Apr  9 12:53:29 2010
@@ -9,7 +9,7 @@
 static int x = (int){1};
 
 static int *p2 = (int []){2,x}; // -expected-error {{initializer element is not a compile-time constant}}
-static long *p3 = (long []){2,"x"}; // -expected-warning {{incompatible pointer to integer conversion initializing 'long' from an expression of type 'char [2]'}}
+static long *p3 = (long []){2,"x"}; // -expected-warning {{incompatible pointer to integer conversion initializing 'long' with an expression of type 'char [2]'}}
 
 typedef struct { } cache_t; // -expected-warning{{use of empty struct extension}}
 static cache_t clo_I1_cache = ((cache_t) { } ); // -expected-warning{{use of GNU empty initializer extension}}

Modified: cfe/trunk/test/Sema/enum.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/enum.c?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/Sema/enum.c (original)
+++ cfe/trunk/test/Sema/enum.c Fri Apr  9 12:53:29 2010
@@ -91,7 +91,7 @@
 typedef enum {
   an_enumerator = 20
 } an_enum;
-char * s = (an_enum) an_enumerator; // expected-warning {{incompatible integer to pointer conversion initializing 'char *' from an expression of type 'an_enum'}}
+char * s = (an_enum) an_enumerator; // expected-warning {{incompatible integer to pointer conversion initializing 'char *' with an expression of type 'an_enum'}}
 
 // PR4515
 enum PR4515 {PR4515a=1u,PR4515b=(PR4515a-2)/2};

Modified: cfe/trunk/test/Sema/invalid-init-diag.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/invalid-init-diag.c?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/Sema/invalid-init-diag.c (original)
+++ cfe/trunk/test/Sema/invalid-init-diag.c Fri Apr  9 12:53:29 2010
@@ -1,4 +1,4 @@
 // RUN: %clang_cc1 %s -verify -fsyntax-only
 
 int a;
-struct {int x;} x = a; // expected-error {{from an expression of incompatible type 'int'}}
+struct {int x;} x = a; // expected-error {{with an expression of incompatible type 'int'}}

Modified: cfe/trunk/test/Sema/predef.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/predef.c?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/Sema/predef.c (original)
+++ cfe/trunk/test/Sema/predef.c Fri Apr  9 12:53:29 2010
@@ -6,7 +6,7 @@
 }
 
 char *X = __func__; // expected-warning {{predefined identifier is only valid}} \
-                       expected-warning {{initializing 'char *' from an expression of type 'char const [1]' discards qualifiers}}
+                       expected-warning {{initializing 'char *' with an expression of type 'char const [1]' discards qualifiers}}
 
 void a() {
   __func__[0] = 'a';  // expected-error {{variable is not assignable}}

Modified: cfe/trunk/test/Sema/struct-compat.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/struct-compat.c?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/Sema/struct-compat.c (original)
+++ cfe/trunk/test/Sema/struct-compat.c Fri Apr  9 12:53:29 2010
@@ -13,5 +13,5 @@
 
 struct x {int a;} r;
 int b() {
-struct x {char x;} s = r; // expected-error {{initializing 'struct x' from an expression of incompatible type 'struct x'}}
+struct x {char x;} s = r; // expected-error {{initializing 'struct x' with an expression of incompatible type 'struct x'}}
 }

Modified: cfe/trunk/test/Sema/warn-write-strings.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/warn-write-strings.c?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/Sema/warn-write-strings.c (original)
+++ cfe/trunk/test/Sema/warn-write-strings.c Fri Apr  9 12:53:29 2010
@@ -1,4 +1,4 @@
 // RUN: %clang_cc1 -verify -fsyntax-only -Wwrite-strings %s
 
 // PR4804
-char* x = "foo"; // expected-warning {{initializing 'char *' from an expression of type 'char const [4]' discards qualifiers}}
+char* x = "foo"; // expected-warning {{initializing 'char *' with an expression of type 'char const [4]' discards qualifiers}}

Modified: cfe/trunk/test/SemaObjC/comptypes-6.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/comptypes-6.m?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/comptypes-6.m (original)
+++ cfe/trunk/test/SemaObjC/comptypes-6.m Fri Apr  9 12:53:29 2010
@@ -9,7 +9,7 @@
 
 static Derived *test(void)
 {
-   Derived *m = foo();   // expected-warning {{incompatible pointer types initializing 'Derived *' from an expression of type 'Object *'}}
+   Derived *m = foo();   // expected-warning {{incompatible pointer types initializing 'Derived *' with an expression of type 'Object *'}}
 
    return m;
 }

Modified: cfe/trunk/test/SemaObjC/conditional-expr-3.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/conditional-expr-3.m?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/conditional-expr-3.m (original)
+++ cfe/trunk/test/SemaObjC/conditional-expr-3.m Fri Apr  9 12:53:29 2010
@@ -27,11 +27,11 @@
 }
 
 void f2(id<P1> x) {
-  id<P0> l = x; // expected-warning {{initializing 'id<P0>' from an expression of incompatible type 'id<P1>'}}
+  id<P0> l = x; // expected-warning {{initializing 'id<P0>' with an expression of incompatible type 'id<P1>'}}
 }
 
 void f3(A *a) {
-  id<P1> l = a; // expected-warning {{ initializing 'id<P1>' from an expression of incompatible type 'A *'}}
+  id<P1> l = a; // expected-warning {{ initializing 'id<P1>' with an expression of incompatible type 'A *'}}
 }
 
 void f4(int cond, id x, A *a) {

Modified: cfe/trunk/test/SemaObjC/conditional-expr-4.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/conditional-expr-4.m?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/conditional-expr-4.m (original)
+++ cfe/trunk/test/SemaObjC/conditional-expr-4.m Fri Apr  9 12:53:29 2010
@@ -26,7 +26,7 @@
 }
 
 void *f1_const_a(int x, void *p, const A * q) {
-  void *r = x ? p : q; // expected-warning{{initializing 'void *' from an expression of type 'void const *' discards qualifiers}}
+  void *r = x ? p : q; // expected-warning{{initializing 'void *' with an expression of type 'void const *' discards qualifiers}}
   return r;
 }
 

Modified: cfe/trunk/test/SemaObjC/message.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/message.m?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/message.m (original)
+++ cfe/trunk/test/SemaObjC/message.m Fri Apr  9 12:53:29 2010
@@ -87,7 +87,7 @@
 int test5(int X) {
   int a = [X somemsg];  // expected-warning {{receiver type 'int' is not 'id'}} \
                            expected-warning {{method '-somemsg' not found}} \
-                           expected-warning {{incompatible pointer to integer conversion initializing 'int' from an expression of type 'id'}}
+                           expected-warning {{incompatible pointer to integer conversion initializing 'int' with an expression of type 'id'}}
   int b = [S somemsg];  // expected-error {{bad receiver type 'struct S'}}
 }
 

Modified: cfe/trunk/test/SemaObjC/warn-write-strings.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/warn-write-strings.m?rev=100873&r1=100872&r2=100873&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/warn-write-strings.m (original)
+++ cfe/trunk/test/SemaObjC/warn-write-strings.m Fri Apr  9 12:53:29 2010
@@ -1,4 +1,4 @@
 // RUN: %clang_cc1 -verify -fsyntax-only -Wwrite-strings %s
 
 // PR4804
-char* x = "foo"; // expected-warning {{initializing 'char *' from an expression of type 'char const [4]' discards qualifiers}}
+char* x = "foo"; // expected-warning {{initializing 'char *' with an expression of type 'char const [4]' discards qualifiers}}





More information about the cfe-commits mailing list