[cfe-commits] r100832 - in /cfe/trunk: include/clang/Basic/ lib/Sema/ test/Analysis/ test/CXX/except/except.handle/ test/FixIt/ test/PCH/ test/Parser/ test/Sema/ test/SemaCXX/ test/SemaObjC/ test/SemaObjCXX/ test/SemaTemplate/

Douglas Gregor dgregor at apple.com
Thu Apr 8 17:35:40 PDT 2010


Author: dgregor
Date: Thu Apr  8 19:35:39 2010
New Revision: 100832

URL: http://llvm.org/viewvc/llvm-project?rev=100832&view=rev
Log:
Improve diagnostics when we fail to convert from a source type to a
destination type for initialization, assignment, parameter-passing,
etc. The main issue fixed here is that we used rather confusing
wording for diagnostics such as

t.c:2:9: warning: initializing 'char const [2]' discards qualifiers,
      expected 'char *' [-pedantic]
  char *name = __func__;
        ^      ~~~~~~~~

We're not initializing a 'char const [2]', we're initializing a 'char
*' with an expression of type 'char const [2]'. Similar problems
existed for other diagnostics in this area, so I've normalized them all
with more precise descriptive text to say what we're
initializing/converting/assigning/etc. from and to. The warning for
the code above is now:

t.c:2:9: warning: initializing 'char *' from an expression of type
      'char const [2]' discards qualifiers [-pedantic]
  char *name = __func__;
        ^      ~~~~~~~~

Fixes <rdar://problem/7447179>.


Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/lib/Sema/SemaExpr.cpp
    cfe/trunk/test/Analysis/null-deref-ps.c
    cfe/trunk/test/Analysis/override-werror.c
    cfe/trunk/test/CXX/except/except.handle/p16.cpp
    cfe/trunk/test/FixIt/fixit-objc.m
    cfe/trunk/test/PCH/functions.c
    cfe/trunk/test/PCH/types.c
    cfe/trunk/test/Parser/altivec.c
    cfe/trunk/test/Parser/builtin_types_compatible.c
    cfe/trunk/test/Parser/cxx-altivec.cpp
    cfe/trunk/test/Parser/declarators.c
    cfe/trunk/test/Parser/implicit-casts.c
    cfe/trunk/test/Sema/address_spaces.c
    cfe/trunk/test/Sema/anonymous-struct-union.c
    cfe/trunk/test/Sema/array-constraint.c
    cfe/trunk/test/Sema/array-init.c
    cfe/trunk/test/Sema/block-call.c
    cfe/trunk/test/Sema/block-misc.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/conditional-expr.c
    cfe/trunk/test/Sema/conditional.c
    cfe/trunk/test/Sema/enum.c
    cfe/trunk/test/Sema/ext_vector_casts.c
    cfe/trunk/test/Sema/function-ptr.c
    cfe/trunk/test/Sema/function-redecl.c
    cfe/trunk/test/Sema/incompatible-sign.c
    cfe/trunk/test/Sema/invalid-init-diag.c
    cfe/trunk/test/Sema/pointer-conversion.c
    cfe/trunk/test/Sema/predef.c
    cfe/trunk/test/Sema/predefined-function.c
    cfe/trunk/test/Sema/statements.c
    cfe/trunk/test/Sema/struct-compat.c
    cfe/trunk/test/Sema/typedef-retain.c
    cfe/trunk/test/Sema/vector-assign.c
    cfe/trunk/test/Sema/vector-cast.c
    cfe/trunk/test/Sema/warn-write-strings.c
    cfe/trunk/test/SemaCXX/copy-assignment.cpp
    cfe/trunk/test/SemaCXX/derived-to-base-ambig.cpp
    cfe/trunk/test/SemaCXX/member-pointer.cpp
    cfe/trunk/test/SemaObjC/argument-checking.m
    cfe/trunk/test/SemaObjC/block-type-safety.m
    cfe/trunk/test/SemaObjC/blocks.m
    cfe/trunk/test/SemaObjC/class-method-self.m
    cfe/trunk/test/SemaObjC/compatible-protocol-qualified-types.m
    cfe/trunk/test/SemaObjC/comptypes-1.m
    cfe/trunk/test/SemaObjC/comptypes-3.m
    cfe/trunk/test/SemaObjC/comptypes-6.m
    cfe/trunk/test/SemaObjC/comptypes-7.m
    cfe/trunk/test/SemaObjC/comptypes-legal.m
    cfe/trunk/test/SemaObjC/conditional-expr-2.m
    cfe/trunk/test/SemaObjC/conditional-expr-3.m
    cfe/trunk/test/SemaObjC/conditional-expr-4.m
    cfe/trunk/test/SemaObjC/conditional-expr.m
    cfe/trunk/test/SemaObjC/id.m
    cfe/trunk/test/SemaObjC/incompatible-protocol-qualified-types.m
    cfe/trunk/test/SemaObjC/message.m
    cfe/trunk/test/SemaObjC/method-arg-qualifier-warning.m
    cfe/trunk/test/SemaObjC/protocol-id-test-3.m
    cfe/trunk/test/SemaObjC/protocol-typecheck.m
    cfe/trunk/test/SemaObjC/protocol-warn.m
    cfe/trunk/test/SemaObjC/warn-incompatible-builtin-types.m
    cfe/trunk/test/SemaObjC/warn-write-strings.m
    cfe/trunk/test/SemaObjCXX/blocks.mm
    cfe/trunk/test/SemaObjCXX/objc-pointer-conv.mm
    cfe/trunk/test/SemaObjCXX/void_to_obj.mm
    cfe/trunk/test/SemaTemplate/fun-template-def.cpp
    cfe/trunk/test/SemaTemplate/instantiate-member-class.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Thu Apr  8 19:35:39 2010
@@ -2229,44 +2229,81 @@
 // In most of these diagnostics the %2 is a value from the
 // Sema::AssignmentAction enumeration
 def err_typecheck_convert_incompatible : Error<
-  "incompatible type %select{assigning|passing|returning|converting|initializing|sending|casting}2"
-  " %1, expected %0">;
+  "%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|"
+  "to incompatible type}2 %1">;
 def warn_incompatible_qualified_id : Warning<
-  "incompatible type %select{assigning|passing|returning|converting|initializing|sending|casting}2"
-  " %1, expected %0">;
+  "%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|"
+  "to incompatible type}2 %1">;
 def ext_typecheck_convert_pointer_int : ExtWarn<
   "incompatible pointer to integer conversion "
-  "%select{assigning|passing|returning|converting|initializing|sending|casting}2 %1, expected %0">;
+  "%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">;
 def ext_typecheck_convert_int_pointer : ExtWarn<
   "incompatible integer to pointer conversion "
-  "%select{assigning|passing|returning|converting|initializing|sending|casting}2 %1, expected %0">;
+  "%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">;
 def ext_typecheck_convert_pointer_void_func : Extension<
-  "%select{assigning|passing|returning|converting|initializing|sending|casting}2"
-  " %1 converts between void* and function pointer, expected %0">;
+  "%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 "
+  "converts between void pointer and function pointer">;
 def ext_typecheck_convert_incompatible_pointer_sign : ExtWarn<
- "pointer types point to integer types with different sign "
- "%select{assigning|passing|returning|converting|initializing|sending|casting}2 %1, expected %0">,
+  "%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 "
+  "converts between pointers to integer types with different sign">,
   InGroup<DiagGroup<"pointer-sign">>;
 def ext_typecheck_convert_incompatible_pointer : ExtWarn<
   "incompatible pointer types "
-  "%select{assigning|passing|returning|converting|initializing|sending|casting}2 %1, expected %0">;
+  "%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">;
 def ext_typecheck_convert_discards_qualifiers : ExtWarn<
-  "%select{assigning|passing|returning|converting|initializing|sending|casting}2"
-  " %1 discards qualifiers, expected %0">;
+  "%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 "
+  "qualifiers">;
 def ext_nested_pointer_qualifier_mismatch : ExtWarn<
-  "%select{assigning|passing|returning|converting|initializing|sending|casting}2,"
-  " %0 and %1 have different qualifiers in nested 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 discards "
+  "qualifiers in nested pointer types">;
 def warn_incompatible_vectors : Warning<
-  "incompatible vector types %select{assigning|passing|returning|converting|initializing|sending|casting}2"
-  " %1, expected %0">,
+  "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">,
   InGroup<VectorConversions>, DefaultIgnore;
 def err_int_to_block_pointer : Error<
-  "invalid conversion "
-  "%select{assigning|passing|returning|converting|initializing|sending|casting}2"
-  " integer %1, expected block pointer %0">;
+  "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">;
 def err_typecheck_convert_incompatible_block_pointer : Error<
   "incompatible block pointer types "
-  "%select{assigning|passing|returning|converting|initializing|sending|casting}2 %1, expected %0">;
+  "%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">;
   
 def err_typecheck_convert_ambiguous : Error<
   "ambiguity in initializing value of type %0 with initializer of type %1">;

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Thu Apr  8 19:35:39 2010
@@ -7201,7 +7201,27 @@
     break;
   }
 
-  Diag(Loc, DiagKind) << DstType << SrcType << Action
+  QualType FirstType, SecondType;
+  switch (Action) {
+  case AA_Assigning:
+  case AA_Initializing:
+    // The destination type comes first.
+    FirstType = DstType;
+    SecondType = SrcType;
+    break;
+      
+  case AA_Returning:
+  case AA_Passing:
+  case AA_Converting:
+  case AA_Sending:
+  case AA_Casting:
+    // The source type comes first.
+    FirstType = SrcType;
+    SecondType = DstType;
+    break;
+  }
+  
+  Diag(Loc, DiagKind) << FirstType << SecondType << Action
     << SrcExpr->getSourceRange() << Hint;
   return isInvalid;
 }

Modified: cfe/trunk/test/Analysis/null-deref-ps.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/null-deref-ps.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/null-deref-ps.c (original)
+++ cfe/trunk/test/Analysis/null-deref-ps.c Thu Apr  8 19:35:39 2010
@@ -62,8 +62,8 @@
 
 int f4_b() {
   short array[2];
-  uintptr_t x = array; // expected-warning{{incompatible pointer to integer conversion initializing}}
-  short *p = x; // expected-warning{{incompatible integer to pointer conversion initializing}}
+  uintptr_t x = array; // expected-warning{{incompatible pointer to integer conversion}}
+  short *p = x; // expected-warning{{incompatible integer to pointer conversion}}
   
   // The following branch should be infeasible.
   if (!(p = &array[0])) {

Modified: cfe/trunk/test/Analysis/override-werror.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/override-werror.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/override-werror.c (original)
+++ cfe/trunk/test/Analysis/override-werror.c Thu Apr  8 19:35:39 2010
@@ -6,7 +6,7 @@
 // analyzer results.
 
 char* f(int *p) { 
-  return p; // expected-warning{{incompatible pointer types returning 'int *', expected 'char *'}}
+  return p; // expected-warning{{incompatible pointer types}}
 }
 
 void g(int *p) {

Modified: cfe/trunk/test/CXX/except/except.handle/p16.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/except/except.handle/p16.cpp?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/CXX/except/except.handle/p16.cpp (original)
+++ cfe/trunk/test/CXX/except/except.handle/p16.cpp Thu Apr  8 19:35:39 2010
@@ -11,12 +11,12 @@
 public:
   X(const X<T> &) {
     int *ip = 0;
-    ptr = ip; // expected-error{{incompatible type assigning 'int *', expected 'float *'}}
+    ptr = ip; // expected-error{{assigning to 'float *' from incompatible type 'int *'}}
   }
 
   ~X() {
     float *fp = 0;
-    ptr = fp; // expected-error{{incompatible type assigning 'float *', expected 'int *'}}
+    ptr = fp; // expected-error{{assigning to 'int *' from incompatible type 'float *'}}
   }
 };
 

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

Modified: cfe/trunk/test/PCH/functions.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/functions.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/PCH/functions.c (original)
+++ cfe/trunk/test/PCH/functions.c Thu Apr  8 19:35:39 2010
@@ -15,7 +15,7 @@
 }
 
 void test_g0(int *x, float * y) {
-  g0(y); // expected-warning{{incompatible pointer types passing 'float *', expected 'int *'}}
+  g0(y); // expected-warning{{incompatible pointer types passing 'float *' to parameter of type 'int *'}}
   g0(x); 
 }
 

Modified: cfe/trunk/test/PCH/types.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/types.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/PCH/types.c (original)
+++ cfe/trunk/test/PCH/types.c Thu Apr  8 19:35:39 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{{incompatible type initializing}}
+typeof_17 t17_2 = (struct S){1, 2}; // expected-error{{initializing 'typeof_17' (aka 'int') from an expression of incompatible type 'struct S'}}
 
 // TYPE_TYPEOF
 int_ptr_ptr2 ipp2 = &int_value_ptr;

Modified: cfe/trunk/test/Parser/altivec.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/altivec.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Parser/altivec.c (original)
+++ cfe/trunk/test/Parser/altivec.c Thu Apr  8 19:35:39 2010
@@ -81,8 +81,8 @@
   gccvector unsigned int gv = v;
   gccvector int gvi = (gccvector int)v;
   __attribute__((vector_size(8))) unsigned int gv8;
-  gv8 = gccv;     // expected-error {{incompatible type assigning '__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int', expected '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int'}}
-  av = gv8;       // expected-error {{incompatible type assigning '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int', expected '__vector unsigned int'}}
+  gv8 = gccv;     // expected-error {{assigning to '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int' from incompatible type '__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int'}}
+  av = gv8;       // expected-error {{assigning to '__vector unsigned int' from incompatible type '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int'}}
 
   v = gccv;
   __vector unsigned int tv = gccv;

Modified: cfe/trunk/test/Parser/builtin_types_compatible.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/builtin_types_compatible.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Parser/builtin_types_compatible.c (original)
+++ cfe/trunk/test/Parser/builtin_types_compatible.c Thu Apr  8 19:35:39 2010
@@ -35,7 +35,7 @@
   struct xx { int a; } x, y;
   
   c = __builtin_choose_expr(a+3-7, b, x); // expected-error{{'__builtin_choose_expr' requires a constant expression}}
-  c = __builtin_choose_expr(0, b, x); // expected-error{{incompatible type assigning 'struct xx', expected 'int'}}
+  c = __builtin_choose_expr(0, b, x); // expected-error{{assigning to 'int' from incompatible type 'struct xx'}}
   c = __builtin_choose_expr(5+3-7, b, x);
   y = __builtin_choose_expr(4+3-7, b, x);
 

Modified: cfe/trunk/test/Parser/cxx-altivec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/cxx-altivec.cpp?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Parser/cxx-altivec.cpp (original)
+++ cfe/trunk/test/Parser/cxx-altivec.cpp Thu Apr  8 19:35:39 2010
@@ -81,8 +81,8 @@
   gccvector unsigned int gv = v;
   gccvector int gvi = (gccvector int)v;
   __attribute__((vector_size(8))) unsigned int gv8;
-  gv8 = gccv;     // expected-error {{incompatible type assigning '__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int', expected '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int'}}
-  av = gv8;       // expected-error {{incompatible type assigning '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int', expected '__vector unsigned int'}}
+  gv8 = gccv;     // expected-error {{assigning to '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int' from incompatible type '__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int'}}
+  av = gv8;       // expected-error {{assigning to '__vector unsigned int' from incompatible type '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int'}}
 
   v = gccv;
   __vector unsigned int tv = gccv;

Modified: cfe/trunk/test/Parser/declarators.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/declarators.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Parser/declarators.c (original)
+++ cfe/trunk/test/Parser/declarators.c Thu Apr  8 19:35:39 2010
@@ -53,7 +53,7 @@
 float *test7() {
   // We should recover 'b' by parsing it with a valid type of "struct xyz", which
   // allows us to diagnose other bad things done with y, such as this.
-  return &b.y;   // expected-warning {{incompatible pointer types returning 'int *', expected 'float *'}}
+  return &b.y;   // expected-warning {{incompatible pointer types returning 'int *' from a function with result type 'float *'}}
 }
 
 struct xyz test8() { return a; }  // a should be be marked invalid, no diag.

Modified: cfe/trunk/test/Parser/implicit-casts.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/implicit-casts.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Parser/implicit-casts.c (original)
+++ cfe/trunk/test/Parser/implicit-casts.c Thu Apr  8 19:35:39 2010
@@ -14,7 +14,7 @@
 }
 int test3() {
   int a[2];
-  a[0] = test3; // expected-warning{{incompatible pointer to integer conversion assigning 'int ()', expected 'int'}}
+  a[0] = test3; // expected-warning{{incompatible pointer to integer conversion assigning to 'int' from 'int ()'}}
   return 0;
 }
 short x; void test4(char c) { x += c; }

Modified: cfe/trunk/test/Sema/address_spaces.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/address_spaces.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/address_spaces.c (original)
+++ cfe/trunk/test/Sema/address_spaces.c Thu Apr  8 19:35:39 2010
@@ -37,6 +37,6 @@
 __attribute__((address_space(256))) void * * const base = 0;
 void * get_0(void) {
   return base[0];  // expected-error {{illegal implicit cast between two pointers with different address spaces}} \
-                      expected-warning {{returning 'void __attribute__((address_space(256))) *' discards qualifiers, expected 'void *'}}
+                      expected-warning {{returning 'void __attribute__((address_space(256))) *' from a function with result type 'void *' discards qualifiers}}
 }
 

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=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/anonymous-struct-union.c (original)
+++ cfe/trunk/test/Sema/anonymous-struct-union.c Thu Apr  8 19:35:39 2010
@@ -101,4 +101,4 @@
 typedef struct {
   int x;
 } a_struct;
-int tmp = (a_struct) { .x = 0 }; // expected-error {{incompatible type initializing 'a_struct', expected 'int'}}
+int tmp = (a_struct) { .x = 0 }; // expected-error {{initializing 'int' from an expression of incompatible type 'a_struct'}}

Modified: cfe/trunk/test/Sema/array-constraint.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/array-constraint.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/array-constraint.c (original)
+++ cfe/trunk/test/Sema/array-constraint.c Thu Apr  8 19:35:39 2010
@@ -46,7 +46,7 @@
 void strFunc(char *);
 const char staticAry[] = "test";
 void checkStaticAry() { 
-  strFunc(staticAry); // expected-warning{{passing 'char const [5]' discards qualifiers, expected 'char *'}}
+  strFunc(staticAry); // expected-warning{{passing 'char const [5]' to parameter of type 'char *' discards qualifiers}}
 }
 
 

Modified: cfe/trunk/test/Sema/array-init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/array-init.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/array-init.c (original)
+++ cfe/trunk/test/Sema/array-init.c Thu Apr  8 19:35:39 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 'char [4]', expected 'long'}}
+static long ary3[] = { 1, "abc", 3, 4 }; // expected-warning{{incompatible pointer to integer conversion initializing 'long' from 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 'int', expected 'struct threeElements *'}}
+  struct threeElements *p = 7; // expected-warning{{incompatible integer to pointer conversion initializing 'struct threeElements *' from 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 'char [4]', expected 'long'}}
+  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]'}}
 }
 
 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 'char [7]', expected 'int'}}
+  int i[] = { "Hello "}; // expected-warning{{incompatible pointer to integer conversion initializing 'int' from 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 'char [6]', expected 'int'}}
+  int i2[1] = { "Hello" }; //expected-warning{{incompatible pointer to integer conversion initializing 'int' from 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 [4]', expected 'char'}}
+struct s1 t3[] = {t1, t1, "abc", 0}; //expected-warning{{incompatible pointer to integer conversion initializing 'char' from 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{{incompatible type initializing 'struct foo', expected 'int'}}
+  struct foo z = { w }; //expected-error{{initializing 'int' from 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=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/block-call.c (original)
+++ cfe/trunk/test/Sema/block-call.c Thu Apr  8 19:35:39 2010
@@ -13,7 +13,7 @@
   int (^IFP) () = PFR; // OK
 
 
-  const int (^CIC) () = IFP; // expected-error {{incompatible block pointer types initializing 'int (^)()', expected 'int const (^)()'}}
+  const int (^CIC) () = IFP; // expected-error {{incompatible block pointer types initializing 'int const (^)()' from 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 *const (^)()', expected 'int *(^)()'}}
+  int * (^IPCC2) () = IPCC;       // expected-error {{incompatible block pointer types initializing 'int *(^)()' from 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 (^)(double))', expected 'int (^)(int, char (^)(float))'}}
+  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))'}}
 
   IPCC2 = 0;
-  IPCC2 = 1; // expected-error {{invalid conversion assigning integer 'int', expected block pointer 'int *(^)()'}}
+  IPCC2 = 1; // expected-error {{invalid block pointer conversion assigning to 'int *(^)()' from 'int'}}
   int (^x)() = 0;
-  int (^y)() = 3;   // expected-error {{invalid conversion initializing integer 'int', expected block pointer 'int (^)()'}}
+  int (^y)() = 3;   // expected-error {{invalid block pointer conversion initializing 'int (^)()' from an expression of type 'int'}}
   int a = 1;
-  int (^z)() = a+4;   // expected-error {{invalid conversion initializing integer 'int', expected block pointer 'int (^)()'}}
+  int (^z)() = a+4;   // expected-error {{invalid block pointer conversion initializing 'int (^)()' from an expression of type 'int'}}
 }
 
 int blah() {

Modified: cfe/trunk/test/Sema/block-misc.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/block-misc.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/block-misc.c (original)
+++ cfe/trunk/test/Sema/block-misc.c Thu Apr  8 19:35:39 2010
@@ -144,7 +144,7 @@
 
 void (^test15f)(void);
 void test15() {
-  foo(^{ return LESS; }); // expected-error {{incompatible block pointer types passing 'int (^)(void)', expected 'long (^)()'}}
+  foo(^{ return LESS; }); // expected-error {{incompatible block pointer types passing 'int (^)(void)' to parameter of type 'long (^)()'}}
 }
 
 __block int test16i;  // expected-error {{__block attribute not allowed, only allowed on local variables}}

Modified: cfe/trunk/test/Sema/block-return.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/block-return.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/block-return.c (original)
+++ cfe/trunk/test/Sema/block-return.c Thu Apr  8 19:35:39 2010
@@ -4,7 +4,7 @@
 
 CL foo() {
   short y;
-  short (^add1)(void) = ^{ return y+1; }; // expected-error {{incompatible block pointer types initializing 'int (^)(void)', expected 'short (^)(void)'}}
+  short (^add1)(void) = ^{ return y+1; }; // expected-error {{incompatible block pointer types initializing 'short (^)(void)' from 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 'float (^)(void)', expected 'double (^)(void)'}}
+  double (^A)(void) = ^ { // expected-error {{incompatible block pointer types initializing 'double (^)(void)' from an expression of type 'float (^)(void)'}}
     if (1)
       return (float)1.0;
     else
@@ -38,10 +38,10 @@
     if (3)
       return "";
     else
-      return 2; // expected-warning {{incompatible integer to pointer conversion returning 'int', expected 'char *'}}
+      return 2; // expected-warning {{incompatible integer to pointer conversion returning 'int' from a function with result type 'char *'}}
   };
 
-  return ^{ return 1; }; // expected-error {{incompatible block pointer types returning 'int (^)(void)', expected 'CL'}}
+  return ^{ return 1; }; // expected-error {{incompatible block pointer types returning 'int (^)(void)' from a function with result type 'CL' (aka 'void (^)(void)')}}
 }
 
 typedef int (^CL2)(void);
@@ -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 *)', expected 'int (^)(char const *)'}}
-  int (*yy)(const char *s) = funk; // expected-warning {{incompatible pointer types initializing 'int (char *)', expected 'int (*)(char const *)'}}
+  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 (^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 (^)(void)', expected 'int const (^)(void)'}}
+ 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 (^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=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/cast-to-union.c (original)
+++ cfe/trunk/test/Sema/cast-to-union.c Thu Apr  8 19:35:39 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{{incompatible type initializing 'int', expected 'union u'}}
+union u x = 7; // expected-error{{initializing 'union u' from 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=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/compound-literal.c (original)
+++ cfe/trunk/test/Sema/compound-literal.c Thu Apr  8 19:35:39 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 'char [2]', expected 'long'}}
+static long *p3 = (long []){2,"x"}; // -expected-warning {{incompatible pointer to integer conversion initializing 'long' from 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/conditional-expr.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/conditional-expr.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/conditional-expr.c (original)
+++ cfe/trunk/test/Sema/conditional-expr.c Thu Apr  8 19:35:39 2010
@@ -13,11 +13,11 @@
 
   dp = vp;
   vp = dp;
-  ip = dp; // expected-warning {{incompatible pointer types assigning 'double *', expected 'int *'}}
-  dp = ip; // expected-warning {{incompatible pointer types assigning 'int *', expected 'double *'}}
+  ip = dp; // expected-warning {{incompatible pointer types assigning to 'int *' from 'double *'}}
+  dp = ip; // expected-warning {{incompatible pointer types assigning to 'double *' from 'int *'}}
   dp = 0 ? (double *)0 : (void *)0;
   vp = 0 ? (double *)0 : (void *)0;
-  ip = 0 ? (double *)0 : (void *)0; // expected-warning {{incompatible pointer types assigning 'double *', expected 'int *'}}
+  ip = 0 ? (double *)0 : (void *)0; // expected-warning {{incompatible pointer types assigning to 'int *' from 'double *'}}
 
   const int *cip;
   vp = (0 ? vp : cip); // expected-warning {{discards qualifiers}}
@@ -66,5 +66,5 @@
 
 int f0(int a) {
   // GCC considers this a warning.
-  return a ? f1() : nil; // expected-warning {{pointer/integer type mismatch in conditional expression ('int' and 'void *')}} expected-warning {{incompatible pointer to integer conversion returning 'void *', expected 'int'}}
+  return a ? f1() : nil; // expected-warning {{pointer/integer type mismatch in conditional expression ('int' and 'void *')}} expected-warning {{incompatible pointer to integer conversion returning 'void *' from a function with result type 'int'}}
 }

Modified: cfe/trunk/test/Sema/conditional.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/conditional.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/conditional.c (original)
+++ cfe/trunk/test/Sema/conditional.c Thu Apr  8 19:35:39 2010
@@ -6,9 +6,9 @@
 void free(void *ptr);
 
 int _php_stream_free1() {
-  return (1 ? free(0) : _efree(0)); // expected-error {{incompatible type returning 'void', expected 'int'}}
+  return (1 ? free(0) : _efree(0)); // expected-error {{returning 'void' from a function with incompatible result type 'int'}}
 }
 
 int _php_stream_free2() {
-  return (1 ? _efree(0) : free(0));  // expected-error {{incompatible type returning 'void', expected 'int'}}
+  return (1 ? _efree(0) : free(0));  // expected-error {{returning 'void' from a function with incompatible result type 'int'}}
 }

Modified: cfe/trunk/test/Sema/enum.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/enum.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/enum.c (original)
+++ cfe/trunk/test/Sema/enum.c Thu Apr  8 19:35:39 2010
@@ -91,8 +91,7 @@
 typedef enum {
   an_enumerator = 20
 } an_enum;
-// FIXME: why is this only a warning?
-char * s = (an_enum) an_enumerator; // expected-warning {{incompatible integer to pointer conversion initializing 'an_enum', expected 'char *'}}
+char * s = (an_enum) an_enumerator; // expected-warning {{incompatible integer to pointer conversion initializing 'char *' from an expression of type 'an_enum'}}
 
 // PR4515
 enum PR4515 {PR4515a=1u,PR4515b=(PR4515a-2)/2};

Modified: cfe/trunk/test/Sema/ext_vector_casts.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/ext_vector_casts.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/ext_vector_casts.c (original)
+++ cfe/trunk/test/Sema/ext_vector_casts.c Thu Apr  8 19:35:39 2010
@@ -25,7 +25,7 @@
     ivec4 = (int4)vec4_3;
     
     i = (int)ivec4; // expected-error {{invalid conversion between vector type 'int4' and integer type 'int' of different size}}
-    i = ivec4; // expected-error {{incompatible type assigning 'int4', expected 'int'}}
+    i = ivec4; // expected-error {{assigning to 'int' from incompatible type 'int4'}}
     
     ivec4 = (int4)ptr; // expected-error {{invalid conversion between vector type 'int4' and scalar type 'int *'}}
     

Modified: cfe/trunk/test/Sema/function-ptr.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/function-ptr.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/function-ptr.c (original)
+++ cfe/trunk/test/Sema/function-ptr.c Thu Apr  8 19:35:39 2010
@@ -3,9 +3,9 @@
 unary_int_func *func;
 
 unary_int_func *set_func(void *p) {
- func = p; // expected-warning {{converts between void* and function pointer}}
- p = func; // expected-warning {{converts between void* and function pointer}}
+ func = p; // expected-warning {{converts between void pointer and function pointer}}
+ p = func; // expected-warning {{converts between void pointer and function pointer}}
 
- return p; // expected-warning {{converts between void* and function pointer}}
+ return p; // expected-warning {{converts between void pointer and function pointer}}
 }
 

Modified: cfe/trunk/test/Sema/function-redecl.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/function-redecl.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/function-redecl.c (original)
+++ cfe/trunk/test/Sema/function-redecl.c Thu Apr  8 19:35:39 2010
@@ -123,7 +123,7 @@
 a2 x2;
 void test_x() {
   x(5);
-  x2(5); // expected-warning{{incompatible integer to pointer conversion passing 'int', expected 'int *'}}
+  x2(5); // expected-warning{{incompatible integer to pointer conversion passing 'int' to parameter of type 'int *'}}
 }
 
 enum e0 {}; 

Modified: cfe/trunk/test/Sema/incompatible-sign.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/incompatible-sign.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/incompatible-sign.c (original)
+++ cfe/trunk/test/Sema/incompatible-sign.c Thu Apr  8 19:35:39 2010
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 %s -verify -fsyntax-only
 
 int a(int* x);
-int b(unsigned* y) { return a(y); } // expected-warning {{pointer types point to integer types with different sign}}
+int b(unsigned* y) { return a(y); } // expected-warning {{passing 'unsigned int *' to parameter of type 'int *' converts between pointers to integer types with different sign}}
 

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=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/invalid-init-diag.c (original)
+++ cfe/trunk/test/Sema/invalid-init-diag.c Thu Apr  8 19:35:39 2010
@@ -1,4 +1,4 @@
 // RUN: %clang_cc1 %s -verify -fsyntax-only
 
 int a;
-struct {int x;} x = a; // expected-error {{incompatible type initializing 'int', expected 'struct <anonymous}}
+struct {int x;} x = a; // expected-error {{from an expression of incompatible type 'int'}}

Modified: cfe/trunk/test/Sema/pointer-conversion.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/pointer-conversion.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/pointer-conversion.c (original)
+++ cfe/trunk/test/Sema/pointer-conversion.c Thu Apr  8 19:35:39 2010
@@ -1,10 +1,10 @@
 //RUN: %clang_cc1 -fsyntax-only -verify %s
 
 char * c;
-char const ** c2 = &c; // expected-warning {{initializing, 'char const **' and 'char **' have different qualifiers in nested pointer types}}
+char const ** c2 = &c; // expected-warning {{discards qualifiers in nested pointer types}}
 
 typedef char dchar;
-dchar *** c3 = &c2; // expected-warning {{initializing, 'dchar ***' and 'char const ***' have different qualifiers in nested pointer types}}
+dchar *** c3 = &c2; // expected-warning {{discards qualifiers in nested pointer types}}
 
 volatile char * c4;
-char ** c5 = &c4; // expected-warning {{initializing, 'char **' and 'char volatile **' have different qualifiers in nested pointer types}}
+char ** c5 = &c4; // expected-warning {{discards qualifiers in nested pointer types}}

Modified: cfe/trunk/test/Sema/predef.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/predef.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/predef.c (original)
+++ cfe/trunk/test/Sema/predef.c Thu Apr  8 19:35:39 2010
@@ -6,7 +6,7 @@
 }
 
 char *X = __func__; // expected-warning {{predefined identifier is only valid}} \
-                       expected-warning {{initializing 'char const [1]' discards qualifiers, expected 'char *'}}
+                       expected-warning {{initializing 'char *' from 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/predefined-function.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/predefined-function.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/predefined-function.c (original)
+++ cfe/trunk/test/Sema/predefined-function.c Thu Apr  8 19:35:39 2010
@@ -10,7 +10,7 @@
 int foo();
 int foo() {
   int eli(int (int)); // expected-error {{conflicting types for 'eli'}}
-  eli(b); // expected-error{{incompatible type passing}}
+  eli(b); // expected-error{{passing 'int (int)' to parameter of incompatible type 'float'}}
   return 0;
 }
 

Modified: cfe/trunk/test/Sema/statements.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/statements.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/statements.c (original)
+++ cfe/trunk/test/Sema/statements.c Thu Apr  8 19:35:39 2010
@@ -13,7 +13,7 @@
 
 // PR2374
 int test2() { return ({L:5;}); }
-int test3() { return ({ {5;} }); }         // expected-error {{incompatible type returning 'void', expected 'int'}}\
+int test3() { return ({ {5;} }); }         // expected-error {{returning 'void' from a function with incompatible result type 'int'}}\
                                            // expected-warning {{expression result unused}}
 int test4() { return ({ ({5;}); }); }
 int test5() { return ({L1: L2: L3: 5;}); }

Modified: cfe/trunk/test/Sema/struct-compat.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/struct-compat.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/struct-compat.c (original)
+++ cfe/trunk/test/Sema/struct-compat.c Thu Apr  8 19:35:39 2010
@@ -13,5 +13,5 @@
 
 struct x {int a;} r;
 int b() {
-struct x {char x;} s = r; // expected-error {{incompatible type initializing}}
+struct x {char x;} s = r; // expected-error {{initializing 'struct x' from an expression of incompatible type 'struct x'}}
 }

Modified: cfe/trunk/test/Sema/typedef-retain.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/typedef-retain.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/typedef-retain.c (original)
+++ cfe/trunk/test/Sema/typedef-retain.c Thu Apr  8 19:35:39 2010
@@ -5,11 +5,11 @@
 typedef int4* int4p;
 
 void test1(float4 a, int4 *result, int i) {
-    result[i] = a; // expected-error {{assigning 'float4', expected 'int4'}}
+    result[i] = a; // expected-error {{assigning to 'int4' from incompatible type 'float4'}}
 }
 
 void test2(float4 a, int4p result, int i) {
-    result[i] = a; // expected-error {{assigning 'float4', expected 'int4'}}
+    result[i] = a; // expected-error {{assigning to 'int4' from incompatible type 'float4'}}
 }
 
 // PR2039

Modified: cfe/trunk/test/Sema/vector-assign.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/vector-assign.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/vector-assign.c (original)
+++ cfe/trunk/test/Sema/vector-assign.c Thu Apr  8 19:35:39 2010
@@ -12,30 +12,30 @@
   v2f v4;
   v4ss v5;
   
-  v1 = v2; // expected-warning {{incompatible vector types assigning 'v2u', expected 'v2s'}}
-  v1 = v3; // expected-error {{incompatible type assigning 'v1s', expected 'v2s'}}
-  v1 = v4; // expected-warning {{incompatible vector types assigning 'v2f', expected 'v2s'}}
-  v1 = v5; // expected-warning {{incompatible vector types assigning 'v4ss', expected 'v2s'}}
+  v1 = v2; // expected-warning {{incompatible vector types assigning to 'v2s' from 'v2u'}}
+  v1 = v3; // expected-error {{assigning to 'v2s' from incompatible type 'v1s'}}
+  v1 = v4; // expected-warning {{incompatible vector types assigning to 'v2s' from 'v2f'}}
+  v1 = v5; // expected-warning {{incompatible vector types assigning to 'v2s' from 'v4ss'}}
   
-  v2 = v1; // expected-warning {{incompatible vector types assigning 'v2s', expected 'v2u'}}
-  v2 = v3; // expected-error {{incompatible type assigning 'v1s', expected 'v2u'}}
-  v2 = v4; // expected-warning {{incompatible vector types assigning 'v2f', expected 'v2u'}}
-  v2 = v5; // expected-warning {{incompatible vector types assigning 'v4ss', expected 'v2u'}}
+  v2 = v1; // expected-warning {{incompatible vector types assigning to 'v2u' from 'v2s'}}
+  v2 = v3; // expected-error {{assigning to 'v2u' from incompatible type 'v1s'}}
+  v2 = v4; // expected-warning {{incompatible vector types assigning to 'v2u' from 'v2f'}}
+  v2 = v5; // expected-warning {{incompatible vector types assigning to 'v2u' from 'v4ss'}}
   
-  v3 = v1; // expected-error {{incompatible type assigning 'v2s', expected 'v1s'}}
-  v3 = v2; // expected-error {{incompatible type assigning 'v2u', expected 'v1s'}}
-  v3 = v4; // expected-error {{incompatible type assigning 'v2f', expected 'v1s'}}
-  v3 = v5; // expected-error {{incompatible type assigning 'v4ss', expected 'v1s'}}
+  v3 = v1; // expected-error {{assigning to 'v1s' from incompatible type 'v2s'}}
+  v3 = v2; // expected-error {{assigning to 'v1s' from incompatible type 'v2u'}}
+  v3 = v4; // expected-error {{assigning to 'v1s' from incompatible type 'v2f'}}
+  v3 = v5; // expected-error {{assigning to 'v1s' from incompatible type 'v4ss'}}
   
-  v4 = v1; // expected-warning {{incompatible vector types assigning 'v2s', expected 'v2f'}}
-  v4 = v2; // expected-warning {{incompatible vector types assigning 'v2u', expected 'v2f'}}
-  v4 = v3; // expected-error {{incompatible type assigning 'v1s', expected 'v2f'}}
-  v4 = v5; // expected-warning {{incompatible vector types assigning 'v4ss', expected 'v2f'}}
+  v4 = v1; // expected-warning {{incompatible vector types assigning to 'v2f' from 'v2s'}}
+  v4 = v2; // expected-warning {{incompatible vector types assigning to 'v2f' from 'v2u'}}
+  v4 = v3; // expected-error {{assigning to 'v2f' from incompatible type 'v1s'}}
+  v4 = v5; // expected-warning {{incompatible vector types assigning to 'v2f' from 'v4ss'}}
   
-  v5 = v1; // expected-warning {{incompatible vector types assigning 'v2s', expected 'v4ss'}}
-  v5 = v2; // expected-warning {{incompatible vector types assigning 'v2u', expected 'v4ss'}}
-  v5 = v3; // expected-error {{incompatible type assigning 'v1s', expected 'v4ss'}}
-  v5 = v4; // expected-warning {{incompatible vector types assigning 'v2f', expected 'v4ss'}}
+  v5 = v1; // expected-warning {{incompatible vector types assigning to 'v4ss' from 'v2s'}}
+  v5 = v2; // expected-warning {{incompatible vector types assigning to 'v4ss' from 'v2u'}}
+  v5 = v3; // expected-error {{assigning to 'v4ss' from incompatible type 'v1s'}}
+  v5 = v4; // expected-warning {{incompatible vector types assigning to 'v4ss' from 'v2f'}}
 }
 
 // PR2263
@@ -49,5 +49,5 @@
 
 void test3a(longlongvec *);
 void test3(const unsigned *src) {
-  test3a(src);  // expected-warning {{incompatible pointer types passing 'unsigned int const *', expected 'longlongvec *'}}
+  test3a(src);  // expected-warning {{incompatible pointer types passing 'unsigned int const *' to parameter of type 'longlongvec *'}}
 }

Modified: cfe/trunk/test/Sema/vector-cast.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/vector-cast.c?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/vector-cast.c (original)
+++ cfe/trunk/test/Sema/vector-cast.c Thu Apr  8 19:35:39 2010
@@ -33,6 +33,6 @@
 void f2(t2 X);
 
 void f3(t3 Y) {
-  f2(Y);  // expected-warning {{incompatible vector types passing 't3', expected 't2'}}
+  f2(Y);  // expected-warning {{incompatible vector types passing 't3' to parameter of type 't2'}}
 }
 

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=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/Sema/warn-write-strings.c (original)
+++ cfe/trunk/test/Sema/warn-write-strings.c Thu Apr  8 19:35:39 2010
@@ -1,4 +1,4 @@
 // RUN: %clang_cc1 -verify -fsyntax-only -Wwrite-strings %s
 
 // PR4804
-char* x = "foo"; // expected-warning {{initializing 'char const [4]' discards qualifiers, expected 'char *'}}
+char* x = "foo"; // expected-warning {{initializing 'char *' from an expression of type 'char const [4]' discards qualifiers}}

Modified: cfe/trunk/test/SemaCXX/copy-assignment.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/copy-assignment.cpp?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/copy-assignment.cpp (original)
+++ cfe/trunk/test/SemaCXX/copy-assignment.cpp Thu Apr  8 19:35:39 2010
@@ -94,6 +94,6 @@
 
   int i;
   i = convertibleToInt;
-  i = a; // expected-error{{incompatible type assigning 'A', expected 'int'}}
+  i = a; // expected-error{{assigning to 'int' from incompatible type 'A'}}
 }
 

Modified: cfe/trunk/test/SemaCXX/derived-to-base-ambig.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/derived-to-base-ambig.cpp?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/derived-to-base-ambig.cpp (original)
+++ cfe/trunk/test/SemaCXX/derived-to-base-ambig.cpp Thu Apr  8 19:35:39 2010
@@ -6,7 +6,7 @@
 
 void f(D* d) {
   A* a;
-  a = d; // expected-error{{ambiguous conversion from derived class 'D' to base class 'A':}} expected-error{{incompatible type assigning 'D *', expected 'A *'}}
+  a = d; // expected-error{{ambiguous conversion from derived class 'D' to base class 'A':}} expected-error{{assigning to 'A *' from incompatible type 'D *'}}
 }
 
 class Object2 { };
@@ -20,7 +20,7 @@
 void g(E2* e2, F2* f2) {
   Object2* o2;
   o2 = e2;
-  o2 = f2; // expected-error{{ambiguous conversion from derived class 'F2' to base class 'Object2':}} expected-error{{incompatible type assigning 'F2 *', expected 'Object2 *'}}
+  o2 = f2; // expected-error{{ambiguous conversion from derived class 'F2' to base class 'Object2':}} expected-error{{assigning to 'Object2 *' from incompatible type 'F2 *'}}
 }
 
 // Test that ambiguous/inaccessibility checking does not trigger too

Modified: cfe/trunk/test/SemaCXX/member-pointer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/member-pointer.cpp?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/member-pointer.cpp (original)
+++ cfe/trunk/test/SemaCXX/member-pointer.cpp Thu Apr  8 19:35:39 2010
@@ -38,7 +38,7 @@
   int G::*pdig = pdi1; // expected-error {{conversion from pointer to member of class 'A' to pointer to member of class 'G' via virtual base 'D' is not allowed}}
 
   // Conversion to member of base.
-  pdi1 = pdid; // expected-error {{incompatible type assigning 'int D::*', expected 'int A::*'}}
+  pdi1 = pdid; // expected-error {{assigning to 'int A::*' from incompatible type 'int D::*'}}
   
   // Comparisons
   int (A::*pf2)(int, int);

Modified: cfe/trunk/test/SemaObjC/argument-checking.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/argument-checking.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/argument-checking.m (original)
+++ cfe/trunk/test/SemaObjC/argument-checking.m Thu Apr  8 19:35:39 2010
@@ -16,10 +16,10 @@
   id obj = [Test alloc];
   struct S sInst;
 
-  charStarFunc(1); // expected-warning {{incompatible integer to pointer conversion passing 'int', expected 'char *'}}
-  charFunc("abc"); // expected-warning {{incompatible pointer to integer conversion passing 'char [4]', expected 'char'}}
+  charStarFunc(1); // expected-warning {{incompatible integer to pointer conversion passing 'int' to parameter of type 'char *'}}
+  charFunc("abc"); // expected-warning {{incompatible pointer to integer conversion passing 'char [4]' to parameter of type 'char'}}
 
   [obj charStarMeth:1]; // expected-warning {{incompatible integer to pointer conversion sending 'int'}}
-  [obj structMeth:1]; // expected-error {{incompatible type sending 'int'}}
-  [obj structMeth:sInst :1]; // expected-error {{incompatible type sending 'int'}}
+  [obj structMeth:1]; // expected-error {{sending 'int'}}
+  [obj structMeth:sInst :1]; // expected-error {{sending 'int'}}
 }

Modified: cfe/trunk/test/SemaObjC/block-type-safety.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/block-type-safety.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/block-type-safety.m (original)
+++ cfe/trunk/test/SemaObjC/block-type-safety.m Thu Apr  8 19:35:39 2010
@@ -29,14 +29,14 @@
 }
 
 void test1() {
-    f2(^(Sub *o) { });    // expected-error {{incompatible block pointer types passing 'void (^)(Sub *)', expected 'void (^)(Super *)'}}
+    f2(^(Sub *o) { });    // expected-error {{incompatible block pointer types passing}}
     f3(^(Super *o) { });  // OK, block taking Super* may be called with a Sub*
 
     r0(^Super* () { return 0; });  // OK
     r0(^Sub* () { return 0; });    // OK, variable of type Super* gets return value of type Sub*
     r0(^id () { return 0; });
 
-    r1(^Super* () { return 0; });  // expected-error {{incompatible block pointer types passing 'Super *(^)(void)', expected 'Sub *(^)()'}}
+    r1(^Super* () { return 0; });  // expected-error {{incompatible block pointer types passing}}
     r1(^Sub* () { return 0; });    // OK
     r1(^id () { return 0; }); 
      
@@ -97,10 +97,10 @@
 @protocol P, P2;
 void f4(void (^f)(id<P> x)) {
     NSArray<P2> *b;
-    f(b);	// expected-warning {{incompatible type passing 'NSArray<P2> *', expected 'id<P>'}}
+    f(b);	// expected-warning {{passing 'NSArray<P2> *' to parameter of incompatible type 'id<P>'}}
 }
 
 void test3() {
-  f4(^(NSArray<P2>* a) { });  // expected-error {{incompatible block pointer types passing 'void (^)(NSArray<P2> *)', expected 'void (^)(id<P>)'}}
+  f4(^(NSArray<P2>* a) { });  // expected-error {{incompatible block pointer types passing 'void (^)(NSArray<P2> *)' to parameter of type 'void (^)(id<P>)'}}
 }
 

Modified: cfe/trunk/test/SemaObjC/blocks.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/blocks.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/blocks.m (original)
+++ cfe/trunk/test/SemaObjC/blocks.m Thu Apr  8 19:35:39 2010
@@ -23,7 +23,7 @@
 
 void bar5(id(^)(void));
 void foo5(id (^objectCreationBlock)(int)) {
-    return bar5(objectCreationBlock); // expected-error {{incompatible block pointer types passing 'id (^)(int)', expected 'id (^)(void)'}}
+    return bar5(objectCreationBlock); // expected-error {{incompatible block pointer types passing 'id (^)(int)' to parameter of type 'id (^)(void)'}}
 }
 
 void bar6(id(^)(int));

Modified: cfe/trunk/test/SemaObjC/class-method-self.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/class-method-self.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/class-method-self.m (original)
+++ cfe/trunk/test/SemaObjC/class-method-self.m Thu Apr  8 19:35:39 2010
@@ -18,9 +18,9 @@
 static XX *obj;
 
 + (void)classMethod {
-  [obj addObserver:self];     // expected-warning {{incompatible pointer types sending 'Class', expected 'XX *'}}
+  [obj addObserver:self];     // expected-warning {{incompatible pointer types sending 'Class' to parameter of type 'XX *'}}
   Class whatever;
-  [obj addObserver:whatever]; // expected-warning {{incompatible pointer types sending 'Class', expected 'XX *'}} 
+  [obj addObserver:whatever]; // expected-warning {{incompatible pointer types sending 'Class' to parameter of type 'XX *'}}
 }
 @end
 

Modified: cfe/trunk/test/SemaObjC/compatible-protocol-qualified-types.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/compatible-protocol-qualified-types.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/compatible-protocol-qualified-types.m (original)
+++ cfe/trunk/test/SemaObjC/compatible-protocol-qualified-types.m Thu Apr  8 19:35:39 2010
@@ -69,7 +69,7 @@
 
 
 - (NSTextStorage *)contents {
- [_contents setDelegate:self]; // expected-warning {{incompatible type sending 'SKTText *', expected 'id<NSTextStorageDelegate>'}}
+ [_contents setDelegate:self]; // expected-warning {{sending 'SKTText *' to parameter of incompatible type 'id<NSTextStorageDelegate>'}}
  return 0;
 }
 

Modified: cfe/trunk/test/SemaObjC/comptypes-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/comptypes-1.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/comptypes-1.m (original)
+++ cfe/trunk/test/SemaObjC/comptypes-1.m Thu Apr  8 19:35:39 2010
@@ -34,25 +34,25 @@
   /* Assigning to a 'MyClass *' variable should always generate a
      warning, unless done from an 'id'.  */
   obj_c = obj;    /* Ok */
-  obj_c = obj_cp; // // expected-warning {{incompatible pointer types assigning 'MyOtherClass *', expected 'MyClass *'}}
-  obj_c = obj_C;  // expected-warning {{incompatible pointer types assigning 'Class', expected 'MyClass *'}}
+  obj_c = obj_cp; // // expected-warning {{incompatible pointer types assigning to 'MyClass *' from 'MyOtherClass *'}}
+  obj_c = obj_C;  // expected-warning {{incompatible pointer types assigning to 'MyClass *' from 'Class'}}
 
   /* Assigning to an 'id<MyProtocol>' variable should generate a
      warning if done from a 'MyClass *' (which doesn't implement
      MyProtocol), but not from an 'id' or from a 'MyOtherClass *'
      (which implements MyProtocol).  */
   obj_p = obj;    /* Ok */
-  obj_p = obj_c;  // expected-warning {{incompatible type assigning 'MyClass *', expected 'id<MyProtocol>'}}
+  obj_p = obj_c;  // expected-warning {{ assigning to 'id<MyProtocol>' from incompatible type 'MyClass *'}}
   obj_p = obj_cp; /* Ok  */
-  obj_p = obj_C;  // expected-warning {{incompatible pointer types assigning 'Class', expected 'id<MyProtocol>'}}
+  obj_p = obj_C;  // expected-warning {{incompatible pointer types assigning to 'id<MyProtocol>' from 'Class'}}
 
   /* Assigning to a 'MyOtherClass *' variable should always generate
      a warning, unless done from an 'id' or an 'id<MyProtocol>' (since
      MyOtherClass implements MyProtocol).  */
   obj_cp = obj;    /* Ok */
-  obj_cp = obj_c;  // expected-warning {{incompatible pointer types assigning 'MyClass *', expected 'MyOtherClass *'}}
+  obj_cp = obj_c;  // expected-warning {{incompatible pointer types assigning to 'MyOtherClass *' from 'MyClass *'}}
   obj_cp = obj_p;  /* Ok */
-  obj_cp = obj_C;  // expected-warning {{incompatible pointer types assigning 'Class', expected 'MyOtherClass *'}}
+  obj_cp = obj_C;  // expected-warning {{incompatible pointer types assigning to 'MyOtherClass *' from 'Class'}}
 
   /* Any comparison involving an 'id' must be without warnings.  */
   if (obj == obj_p) foo() ;  /* Ok  */ /*Bogus warning here in 2.95.4*/

Modified: cfe/trunk/test/SemaObjC/comptypes-3.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/comptypes-3.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/comptypes-3.m (original)
+++ cfe/trunk/test/SemaObjC/comptypes-3.m Thu Apr  8 19:35:39 2010
@@ -26,21 +26,21 @@
   id<MyProtocolAB> obj_ab = nil;
   id<MyProtocolAC> obj_ac = nil;
 
-  obj_a = obj_b;  // expected-warning {{incompatible type assigning 'id<MyProtocolB>', expected 'id<MyProtocolA>'}}
+  obj_a = obj_b;  // expected-warning {{assigning to 'id<MyProtocolA>' from incompatible type 'id<MyProtocolB>'}}
   obj_a = obj_ab; /* Ok */
   obj_a = obj_ac; /* Ok */
   
-  obj_b = obj_a;  // expected-warning {{incompatible type assigning 'id<MyProtocolA>', expected 'id<MyProtocolB>'}}
+  obj_b = obj_a;  // expected-warning {{assigning to 'id<MyProtocolB>' from incompatible type 'id<MyProtocolA>'}}
   obj_b = obj_ab; /* Ok */
-  obj_b = obj_ac; // expected-warning {{incompatible type assigning 'id<MyProtocolAC>', expected 'id<MyProtocolB>'}}
+  obj_b = obj_ac; // expected-warning {{assigning to 'id<MyProtocolB>' from incompatible type 'id<MyProtocolAC>'}}
   
-  obj_ab = obj_a;  // expected-warning {{incompatible type assigning 'id<MyProtocolA>', expected 'id<MyProtocolAB>'}}
-  obj_ab = obj_b;  // expected-warning {{incompatible type assigning 'id<MyProtocolB>', expected 'id<MyProtocolAB>'}}
-  obj_ab = obj_ac; // expected-warning {{incompatible type assigning 'id<MyProtocolAC>', expected 'id<MyProtocolAB>'}}
+  obj_ab = obj_a;  // expected-warning {{assigning to 'id<MyProtocolAB>' from incompatible type 'id<MyProtocolA>'}}
+  obj_ab = obj_b;  // expected-warning {{assigning to 'id<MyProtocolAB>' from incompatible type 'id<MyProtocolB>'}}
+  obj_ab = obj_ac; // expected-warning {{assigning to 'id<MyProtocolAB>' from incompatible type 'id<MyProtocolAC>'}}
   
-  obj_ac = obj_a;  // expected-warning {{incompatible type assigning 'id<MyProtocolA>', expected 'id<MyProtocolAC>'}}
-  obj_ac = obj_b;  // expected-warning {{incompatible type assigning 'id<MyProtocolB>', expected 'id<MyProtocolAC>'}}
-  obj_ac = obj_ab; // expected-warning {{incompatible type assigning 'id<MyProtocolAB>', expected 'id<MyProtocolAC>'}}
+  obj_ac = obj_a;  // expected-warning {{assigning to 'id<MyProtocolAC>' from incompatible type 'id<MyProtocolA>'}}
+  obj_ac = obj_b;  // expected-warning {{assigning to 'id<MyProtocolAC>' from incompatible type 'id<MyProtocolB>'}}
+  obj_ac = obj_ab; // expected-warning {{assigning to 'id<MyProtocolAC>' from incompatible type 'id<MyProtocolAB>'}}
 
   if (obj_a == obj_b) foo (); // expected-warning {{comparison of distinct pointer types ('id<MyProtocolA>' and 'id<MyProtocolB>')}}
   if (obj_b == obj_a) foo (); // expected-warning {{comparison of distinct pointer types ('id<MyProtocolB>' and 'id<MyProtocolA>')}}

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

Modified: cfe/trunk/test/SemaObjC/comptypes-7.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/comptypes-7.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/comptypes-7.m (original)
+++ cfe/trunk/test/SemaObjC/comptypes-7.m Thu Apr  8 19:35:39 2010
@@ -24,27 +24,27 @@
 
   /* These should all generate warnings.  */
   
-  obj = i; // expected-warning {{incompatible integer to pointer conversion assigning 'int', expected 'id'}}
-  obj = j; // expected-warning {{incompatible pointer types assigning 'int *', expected 'id'}}
+  obj = i; // expected-warning {{incompatible integer to pointer conversion assigning to 'id' from 'int'}}
+  obj = j; // expected-warning {{incompatible pointer types assigning to 'id' from 'int *'}}
 
-  obj_p = i; // expected-warning {{incompatible integer to pointer conversion assigning 'int', expected 'id<MyProtocol>'}}
-  obj_p = j; // expected-warning {{incompatible pointer types assigning 'int *', expected 'id<MyProtocol>'}}
+  obj_p = i; // expected-warning {{incompatible integer to pointer conversion assigning to 'id<MyProtocol>' from 'int'}}
+  obj_p = j; // expected-warning {{ incompatible pointer types assigning to 'id<MyProtocol>' from 'int *'}}
   
-  obj_c = i; // expected-warning {{incompatible integer to pointer conversion assigning 'int', expected 'MyClass *'}}
-  obj_c = j; // expected-warning {{incompatible pointer types assigning 'int *', expected 'MyClass *'}}
+  obj_c = i; // expected-warning {{ incompatible integer to pointer conversion assigning to 'MyClass *' from 'int'}}
+  obj_c = j; // expected-warning {{incompatible pointer types assigning to 'MyClass *' from 'int *'}}
 
-  obj_C = i; // expected-warning {{incompatible integer to pointer conversion assigning 'int', expected 'Class'}}
-  obj_C = j; // expected-warning {{incompatible pointer types assigning 'int *', expected 'Class'}}
+  obj_C = i; // expected-warning {{incompatible integer to pointer conversion assigning to 'Class' from 'int'}}
+  obj_C = j; // expected-warning {{incompatible pointer types assigning to 'Class' from 'int *'}}
   
-  i = obj;   // expected-warning {{incompatible pointer to integer conversion assigning 'id', expected 'int'}}
-  i = obj_p; // expected-warning {{incompatible pointer to integer conversion assigning 'id<MyProtocol>', expected 'int'}}
-  i = obj_c; // expected-warning {{incompatible pointer to integer conversion assigning 'MyClass *', expected 'int'}}
-  i = obj_C; // expected-warning {{incompatible pointer to integer conversion assigning 'Class', expected 'int'}}
+  i = obj;   // expected-warning {{incompatible pointer to integer conversion assigning to 'int' from 'id'}}
+  i = obj_p; // expected-warning {{incompatible pointer to integer conversion assigning to 'int' from 'id<MyProtocol>'}}
+  i = obj_c; // expected-warning {{incompatible pointer to integer conversion assigning to 'int' from 'MyClass *'}}
+  i = obj_C; // expected-warning {{incompatible pointer to integer conversion assigning to 'int' from 'Class'}}
   
-  j = obj;   // expected-warning {{incompatible pointer types assigning 'id', expected 'int *'}}
-  j = obj_p; // expected-warning {{incompatible pointer types assigning 'id<MyProtocol>', expected 'int *'}}
-  j = obj_c; // expected-warning {{incompatible pointer types assigning 'MyClass *', expected 'int *'}}
-  j = obj_C; // expected-warning {{incompatible pointer types assigning 'Class', expected 'int *'}}
+  j = obj;   // expected-warning {{incompatible pointer types assigning to 'int *' from 'id'}}
+  j = obj_p; // expected-warning {{ incompatible pointer types assigning to 'int *' from 'id<MyProtocol>'}}
+  j = obj_c; // expected-warning {{incompatible pointer types assigning to 'int *' from 'MyClass *'}}
+  j = obj_C; // expected-warning {{incompatible pointer types assigning to 'int *' from 'Class'}}
   
   if (obj == i) foo() ; // expected-warning {{comparison between pointer and integer ('id' and 'int')}}
   if (i == obj) foo() ; // expected-warning {{comparison between pointer and integer ('int' and 'id')}}

Modified: cfe/trunk/test/SemaObjC/comptypes-legal.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/comptypes-legal.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/comptypes-legal.m (original)
+++ cfe/trunk/test/SemaObjC/comptypes-legal.m Thu Apr  8 19:35:39 2010
@@ -33,5 +33,5 @@
 {
   // GCC currently allows this (it has some fiarly new support for covariant return types and contravariant argument types).
   // Since registerFunc: expects a Derived object as it's second argument, I don't know why this would be legal.
-  [Derived registerFunc: ExternFunc];  // expected-warning{{incompatible pointer types sending 'NSObject *(NSObject *, NSObject *)', expected 'FuncSignature *'}}
+  [Derived registerFunc: ExternFunc];  // expected-warning{{incompatible pointer types sending 'NSObject *(NSObject *, NSObject *)' to parameter of type 'FuncSignature *'}}
 }

Modified: cfe/trunk/test/SemaObjC/conditional-expr-2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/conditional-expr-2.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/conditional-expr-2.m (original)
+++ cfe/trunk/test/SemaObjC/conditional-expr-2.m Thu Apr  8 19:35:39 2010
@@ -25,5 +25,5 @@
   obj = i ? NSKeyValueCoding_NullValue : nukedUpdatesList; // expected-warning{{incompatible operand types ('NSKey *' and 'UpdatesList *')}}
   key = i ? NSKeyValueCoding_NullValue : nukedUpdatesList; // expected-warning{{incompatible operand types ('NSKey *' and 'UpdatesList *')}}
   key = i ? NSKeyValueCoding_NullValue : keysub;
-  keysub = i ? NSKeyValueCoding_NullValue : keysub; // expected-warning{{incompatible pointer types assigning 'NSKey *', expected 'KeySub *'}}
+  keysub = i ? NSKeyValueCoding_NullValue : keysub; // expected-warning{{incompatible pointer types assigning to 'KeySub *' from 'NSKey *'}}
 }

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=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/conditional-expr-3.m (original)
+++ cfe/trunk/test/SemaObjC/conditional-expr-3.m Thu Apr  8 19:35:39 2010
@@ -27,11 +27,11 @@
 }
 
 void f2(id<P1> x) {
-  id<P0> l = x; // expected-warning {{incompatible type initializing 'id<P1>', expected 'id<P0>'}}
+  id<P0> l = x; // expected-warning {{initializing 'id<P0>' from an expression of incompatible type 'id<P1>'}}
 }
 
 void f3(A *a) {
-  id<P1> l = a; // expected-warning {{incompatible type initializing 'A *', expected 'id<P1>'}}
+  id<P1> l = a; // expected-warning {{ initializing 'id<P1>' from 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=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/conditional-expr-4.m (original)
+++ cfe/trunk/test/SemaObjC/conditional-expr-4.m Thu Apr  8 19:35:39 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 const *' discards qualifiers, expected 'void *'}}
+  void *r = x ? p : q; // expected-warning{{initializing 'void *' from an expression of type 'void const *' discards qualifiers}}
   return r;
 }
 

Modified: cfe/trunk/test/SemaObjC/conditional-expr.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/conditional-expr.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/conditional-expr.m (original)
+++ cfe/trunk/test/SemaObjC/conditional-expr.m Thu Apr  8 19:35:39 2010
@@ -27,7 +27,7 @@
 @implementation DTFilterOutputStream2 // expected-warning {{incomplete implementation}}
 - (id)initWithNextOutputStream:(id <DTOutputStreams>) outputStream {
   id <DTOutputStreams> nextOutputStream = [self nextOutputStream];
-  self = nextOutputStream; // expected-warning {{incompatible type assigning 'id<DTOutputStreams>', expected 'DTFilterOutputStream2 *'}}
+  self = nextOutputStream; // expected-warning {{assigning to 'DTFilterOutputStream2 *' from incompatible type 'id<DTOutputStreams>'}}
   return nextOutputStream ? nextOutputStream : self; // expected-warning {{incompatible operand types ('id<DTOutputStreams>' and 'DTFilterOutputStream2 *')}}
 }
 @end
@@ -36,7 +36,7 @@
 @implementation DTFilterOutputStream3 // expected-warning {{cannot find interface declaration for 'DTFilterOutputStream3'}}
 - (id)initWithNextOutputStream:(id <DTOutputStreams>) outputStream {
   id <DTOutputStreams> nextOutputStream = [self nextOutputStream]; // expected-warning {{method '-nextOutputStream' not found (return type defaults to 'id')}}
-  self = nextOutputStream; // expected-warning {{incompatible type assigning 'id<DTOutputStreams>', expected 'DTFilterOutputStream3 *'}}
+  self = nextOutputStream; // expected-warning {{assigning to 'DTFilterOutputStream3 *' from incompatible type 'id<DTOutputStreams>'}}
   return nextOutputStream ? nextOutputStream : self; // expected-warning {{incompatible operand types ('id<DTOutputStreams>' and 'DTFilterOutputStream3 *')}}
 }
 @end

Modified: cfe/trunk/test/SemaObjC/id.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/id.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/id.m (original)
+++ cfe/trunk/test/SemaObjC/id.m Thu Apr  8 19:35:39 2010
@@ -9,8 +9,8 @@
   // Test assignment compatibility of Class and id.  No warning should be
   // produced.
   // rdar://6770142 - Class and id<foo> are compatible.
-  S = T; // expected-warning {{incompatible pointer types assigning 'Class', expected 'id<Foo>'}}
-  T = S; // expected-warning {{incompatible pointer types assigning 'id<Foo>', expected 'Class'}}
+  S = T; // expected-warning {{incompatible pointer types assigning to 'id<Foo>' from 'Class'}}
+  T = S; // expected-warning {{incompatible pointer types assigning to 'Class' from 'id<Foo>'}}
   R = T; T = R;
   R = S; S = R;
 }

Modified: cfe/trunk/test/SemaObjC/incompatible-protocol-qualified-types.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/incompatible-protocol-qualified-types.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/incompatible-protocol-qualified-types.m (original)
+++ cfe/trunk/test/SemaObjC/incompatible-protocol-qualified-types.m Thu Apr  8 19:35:39 2010
@@ -21,15 +21,15 @@
 
 INTF <MyProto1, MyProto2> * Func2(INTF <MyProto1> *p2)
 {
-	Func(p2);	// expected-warning {{incompatible pointer types passing 'INTF<MyProto1> *', expected 'INTF<MyProto1,MyProto2> *}}
-	return p2;	// expected-warning {{incompatible pointer types returning 'INTF<MyProto1> *', expected 'INTF<MyProto1,MyProto2> *}}
+	Func(p2);	// expected-warning {{incompatible pointer types passing 'INTF<MyProto1> *' to parameter of type 'INTF<MyProto1,MyProto2> *'}}
+	return p2;	// expected-warning {{incompatible pointer types returning 'INTF<MyProto1> *' from a function with result type 'INTF<MyProto1,MyProto2> *'}}
 }
 
 
 
 INTF <MyProto1> * Func3(INTF <MyProto2> *p2)
 {
-	return p2;	// expected-warning {{incompatible pointer types returning 'INTF<MyProto2> *', expected 'INTF<MyProto1> *}}
+	return p2;	// expected-warning {{incompatible pointer types returning 'INTF<MyProto2> *' from a function with result type 'INTF<MyProto1> *'}}
 }
 
 

Modified: cfe/trunk/test/SemaObjC/message.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/message.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/message.m (original)
+++ cfe/trunk/test/SemaObjC/message.m Thu Apr  8 19:35:39 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 'id', expected 'int'}}
+                           expected-warning {{incompatible pointer to integer conversion initializing 'int' from an expression of type 'id'}}
   int b = [S somemsg];  // expected-error {{bad receiver type 'struct S'}}
 }
 

Modified: cfe/trunk/test/SemaObjC/method-arg-qualifier-warning.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/method-arg-qualifier-warning.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/method-arg-qualifier-warning.m (original)
+++ cfe/trunk/test/SemaObjC/method-arg-qualifier-warning.m Thu Apr  8 19:35:39 2010
@@ -12,8 +12,8 @@
 
 int main () {
         
-    [@"Identifier1" isEqualToString:Identifier1]; // expected-warning {{sending 'NSString const *' discards qualifiers, expected 'NSString *'}}
-    [@"Identifier2" isEqualToString:Identifier2]; // expected-warning {{sending 'NSString const *' discards qualifiers, expected 'NSString *'}}
+    [@"Identifier1" isEqualToString:Identifier1]; // expected-warning {{sending 'NSString const *' to parameter of type 'NSString *' discards qualifiers}}
+    [@"Identifier2" isEqualToString:Identifier2]; // expected-warning {{sending 'NSString const *' to parameter of type 'NSString *' discards qualifiers}}
     [@"Identifier3" isEqualToString:Identifier3];
     return 0;
 }

Modified: cfe/trunk/test/SemaObjC/protocol-id-test-3.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/protocol-id-test-3.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/protocol-id-test-3.m (original)
+++ cfe/trunk/test/SemaObjC/protocol-id-test-3.m Thu Apr  8 19:35:39 2010
@@ -29,15 +29,15 @@
 
 id<MyProto1, MyProto2> Gunc2(id <MyProto1>p2)
 {
-	Func(p2);	// expected-warning {{incompatible type passing 'id<MyProto1>', expected 'INTF<MyProto1,MyProto2> *'}}
-	return p2;	// expected-warning {{incompatible type returning 'id<MyProto1>', expected 'id<MyProto1,MyProto2>'}}
+	Func(p2);	// expected-warning {{passing 'id<MyProto1>' to parameter of incompatible type 'INTF<MyProto1,MyProto2> *'}}
+	return p2;	// expected-warning {{returning 'id<MyProto1>' from a function with incompatible result type 'id<MyProto1,MyProto2>'}}
 }
 
 
 
 id<MyProto1> Gunc3(id <MyProto2>p2)
 {
-	return p2;	 // expected-warning {{incompatible type returning 'id<MyProto2>', expected 'id<MyProto1>'}}
+	return p2;	 // expected-warning {{returning 'id<MyProto2>' from a function with incompatible result type 'id<MyProto1>'}}
 }
 
 
@@ -61,13 +61,13 @@
 
 INTF<MyProto1, MyProto2> * Hunc2(id <MyProto1>p2)
 {
-	Func(p2);	// expected-warning {{incompatible type passing 'id<MyProto1>', expected 'INTF<MyProto1,MyProto2> *'}}
-	return p2;	// expected-warning {{incompatible type returning 'id<MyProto1>', expected 'INTF<MyProto1,MyProto2> *'}}
+	Func(p2);	// expected-warning {{passing 'id<MyProto1>' to parameter of incompatible type 'INTF<MyProto1,MyProto2> *'}}
+	return p2;	// expected-warning {{returning 'id<MyProto1>' from a function with incompatible result type 'INTF<MyProto1,MyProto2> *'}}
 }
 
 INTF<MyProto1> * Hunc3(id <MyProto2>p2)
 {
-	return p2;	 // expected-warning {{incompatible type returning 'id<MyProto2>', expected 'INTF<MyProto1> *'}}
+	return p2;	 // expected-warning {{returning 'id<MyProto2>' from a function with incompatible result type 'INTF<MyProto1> *'}}
 }
 
 

Modified: cfe/trunk/test/SemaObjC/protocol-typecheck.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/protocol-typecheck.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/protocol-typecheck.m (original)
+++ cfe/trunk/test/SemaObjC/protocol-typecheck.m Thu Apr  8 19:35:39 2010
@@ -20,6 +20,6 @@
   [obj setFlexElement:flexer];
   // FIXME: GCC provides the following diagnostic (which is much better):
   // protocol-typecheck.m:21: warning: class 'NSObject <PWhatever, XCElementP>' does not implement the 'XCElementSpacerP' protocol
-  [obj setFlexElement2:flexer2]; // expected-warning{{incompatible pointer types sending 'NSObject<PWhatever,XCElementP> *', expected 'NSObject<PWhatever,XCElementSpacerP> *'}}
+  [obj setFlexElement2:flexer2]; // expected-warning{{incompatible pointer types sending 'NSObject<PWhatever,XCElementP> *' to parameter of type 'NSObject<PWhatever,XCElementSpacerP> *'}}
 }
 

Modified: cfe/trunk/test/SemaObjC/protocol-warn.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/protocol-warn.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/protocol-warn.m (original)
+++ cfe/trunk/test/SemaObjC/protocol-warn.m Thu Apr  8 19:35:39 2010
@@ -51,5 +51,5 @@
 {
     UIWebBrowserView *browserView;
     UIWebPDFView *pdfView;
-    return pdfView ? pdfView : browserView; // expected-warning {{incompatible pointer types returning 'UIView<NSObject> *', expected 'UIWebPDFView *'}}
+    return pdfView ? pdfView : browserView; // expected-warning {{incompatible pointer types returning 'UIView<NSObject> *' from a function with result type 'UIWebPDFView *'}}
 }

Modified: cfe/trunk/test/SemaObjC/warn-incompatible-builtin-types.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/warn-incompatible-builtin-types.m?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/warn-incompatible-builtin-types.m (original)
+++ cfe/trunk/test/SemaObjC/warn-incompatible-builtin-types.m Thu Apr  8 19:35:39 2010
@@ -10,8 +10,8 @@
     SEL s1, s2;
     id i, i1;
     Foo *f;
-    [f foo:f];	// expected-warning {{incompatible pointer types sending 'Foo *', expected 'Class'}}
-    c = f;	// expected-warning {{incompatible pointer types assigning 'Foo *', expected 'Class'}}
+    [f foo:f];	// expected-warning {{incompatible pointer types sending 'Foo *' to parameter of type 'Class'}}
+    c = f;	// expected-warning {{incompatible pointer types assigning to 'Class' from 'Foo *'}}
 
     c = i;
 
@@ -21,22 +21,22 @@
 
     i = i1;
 
-    s1 = i;	// expected-warning {{incompatible pointer types assigning 'id', expected 'SEL'}}
-    i = s1;	// expected-warning {{incompatible pointer types assigning 'SEL', expected 'id'}}
+    s1 = i;	// expected-warning {{incompatible pointer types assigning to 'SEL' from 'id'}}
+    i = s1;	// expected-warning {{incompatible pointer types assigning to 'id' from 'SEL'}}
 
     s1 = s2;
 
-    s1 = c;	// expected-warning {{incompatible pointer types assigning 'Class', expected 'SEL'}}
+    s1 = c;	// expected-warning {{incompatible pointer types assigning to 'SEL' from 'Class'}}
 
-    c = s1;	// expected-warning {{incompatible pointer types assigning 'SEL', expected 'Class'}}
+    c = s1;	// expected-warning {{incompatible pointer types assigning to 'Class' from 'SEL'}}
 
     f = i;
 
-    f = c;	// expected-warning {{incompatible pointer types assigning 'Class', expected 'Foo *'}}
+    f = c;	// expected-warning {{incompatible pointer types assigning to 'Foo *' from 'Class'}}
 
-    f = s1;	// expected-warning {{incompatible pointer types assigning 'SEL', expected 'Foo *'}}
+    f = s1;	// expected-warning {{incompatible pointer types assigning to 'Foo *' from 'SEL'}}
 
     i = f;
 
-    s1 = f; 	// expected-warning {{incompatible pointer types assigning 'Foo *', expected 'SEL'}}
+    s1 = f; 	// expected-warning {{incompatible pointer types assigning to 'SEL' from 'Foo *'}}
 }

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=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/warn-write-strings.m (original)
+++ cfe/trunk/test/SemaObjC/warn-write-strings.m Thu Apr  8 19:35:39 2010
@@ -1,4 +1,4 @@
 // RUN: %clang_cc1 -verify -fsyntax-only -Wwrite-strings %s
 
 // PR4804
-char* x = "foo"; // expected-warning {{initializing 'char const [4]' discards qualifiers, expected 'char *'}}
+char* x = "foo"; // expected-warning {{initializing 'char *' from an expression of type 'char const [4]' discards qualifiers}}

Modified: cfe/trunk/test/SemaObjCXX/blocks.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/blocks.mm?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjCXX/blocks.mm (original)
+++ cfe/trunk/test/SemaObjCXX/blocks.mm Thu Apr  8 19:35:39 2010
@@ -3,12 +3,12 @@
 
 void bar(id(^)(void));
 void foo(id <NSObject>(^objectCreationBlock)(void)) {
-    return bar(objectCreationBlock); // expected-warning{{incompatible pointer types converting 'id (^)()', expected 'id<NSObject> (^)()'}}
+    return bar(objectCreationBlock); // expected-warning{{incompatible pointer types converting 'id<NSObject> (^)()' to type 'id (^)()'}}
 }
 
 void bar2(id(*)(void));
 void foo2(id <NSObject>(*objectCreationBlock)(void)) {
-    return bar2(objectCreationBlock); // expected-warning{{incompatible pointer types converting 'id (*)()', expected 'id<NSObject> (*)()'}}
+    return bar2(objectCreationBlock); // expected-warning{{incompatible pointer types converting 'id<NSObject> (*)()' to type 'id (*)()'}}
 }
 
 void bar3(id(*)()); // expected-note{{candidate function}}

Modified: cfe/trunk/test/SemaObjCXX/objc-pointer-conv.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/objc-pointer-conv.mm?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjCXX/objc-pointer-conv.mm (original)
+++ cfe/trunk/test/SemaObjCXX/objc-pointer-conv.mm Thu Apr  8 19:35:39 2010
@@ -32,7 +32,7 @@
 void Func (I* arg);  // expected-note {{candidate function not viable: no known conversion from 'I const *' to 'I *' for 1st argument}}
 
 void foo(const I *p, I* sel) {
-  [sel Meth : p];	// expected-error {{incompatible type sending 'I const *', expected 'I *'}}
+  [sel Meth : p];	// expected-error {{sending 'I const *' to parameter of incompatible type 'I *'}}
   Func(p);		// expected-error {{no matching function for call to 'Func'}}
 }
 

Modified: cfe/trunk/test/SemaObjCXX/void_to_obj.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/void_to_obj.mm?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjCXX/void_to_obj.mm (original)
+++ cfe/trunk/test/SemaObjCXX/void_to_obj.mm Thu Apr  8 19:35:39 2010
@@ -7,5 +7,5 @@
   XX *obj;
   void *vv;
 
-  obj = vv; // expected-error{{incompatible type assigning 'void *', expected 'XX *'}}
+  obj = vv; // expected-error{{assigning to 'XX *' from incompatible type 'void *'}}
 }

Modified: cfe/trunk/test/SemaTemplate/fun-template-def.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/fun-template-def.cpp?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/fun-template-def.cpp (original)
+++ cfe/trunk/test/SemaTemplate/fun-template-def.cpp Thu Apr  8 19:35:39 2010
@@ -42,7 +42,7 @@
   dummy d1 = sizeof(t1); // expected-error {{no viable conversion}}
   dummy d2 = offsetof(T, foo); // expected-error {{no viable conversion}}
   dummy d3 = __alignof(u1); // expected-error {{no viable conversion}}
-  i1 = typeid(t1); // expected-error {{incompatible type assigning}}
+  i1 = typeid(t1); // expected-error {{assigning to 'int' from incompatible type 'std::type_info const'}}
 
   return u1;
 }

Modified: cfe/trunk/test/SemaTemplate/instantiate-member-class.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/instantiate-member-class.cpp?rev=100832&r1=100831&r2=100832&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/instantiate-member-class.cpp (original)
+++ cfe/trunk/test/SemaTemplate/instantiate-member-class.cpp Thu Apr  8 19:35:39 2010
@@ -18,8 +18,8 @@
 X<float>::X *xf; // expected-error{{qualified reference to 'X' is a constructor name rather than a type wherever a constructor can be declared}}
 
 void test_naming() {
-  c1 = c2; // expected-error{{incompatible type assigning 'X<float>::C *', expected 'X<int>::C *'}}
-  xi = xf;  // expected-error{{incompatible type assigning}}
+  c1 = c2; // expected-error{{assigning to 'X<int>::C *' from incompatible type 'X<float>::C *'}}
+  xi = xf;  // expected-error{{assigning to 'X<int>::X<int> *' from incompatible type 'X<float>::X<float> *'}}
     // FIXME: error above doesn't print the type X<int>::X cleanly!
 }
 





More information about the cfe-commits mailing list