Improve diagnostics like "initializing <type> from an expression of
type..." with "initializing <type> with an expression of type...",
which reads better. Thanks to John for the improved wording.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100873 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjC/comptypes-6.m b/test/SemaObjC/comptypes-6.m
index cabf813..98cf488 100644
--- a/test/SemaObjC/comptypes-6.m
+++ b/test/SemaObjC/comptypes-6.m
@@ -9,7 +9,7 @@
static Derived *test(void)
{
- Derived *m = foo(); // expected-warning {{incompatible pointer types initializing 'Derived *' from an expression of type 'Object *'}}
+ Derived *m = foo(); // expected-warning {{incompatible pointer types initializing 'Derived *' with an expression of type 'Object *'}}
return m;
}
diff --git a/test/SemaObjC/conditional-expr-3.m b/test/SemaObjC/conditional-expr-3.m
index 9f34ca0..3b5f609 100644
--- a/test/SemaObjC/conditional-expr-3.m
+++ b/test/SemaObjC/conditional-expr-3.m
@@ -27,11 +27,11 @@
}
void f2(id<P1> x) {
- id<P0> l = x; // expected-warning {{initializing 'id<P0>' from an expression of incompatible type 'id<P1>'}}
+ id<P0> l = x; // expected-warning {{initializing 'id<P0>' with an expression of incompatible type 'id<P1>'}}
}
void f3(A *a) {
- id<P1> l = a; // expected-warning {{ initializing 'id<P1>' from an expression of incompatible type 'A *'}}
+ id<P1> l = a; // expected-warning {{ initializing 'id<P1>' with an expression of incompatible type 'A *'}}
}
void f4(int cond, id x, A *a) {
diff --git a/test/SemaObjC/conditional-expr-4.m b/test/SemaObjC/conditional-expr-4.m
index 944c175..b3317f5 100644
--- a/test/SemaObjC/conditional-expr-4.m
+++ b/test/SemaObjC/conditional-expr-4.m
@@ -26,7 +26,7 @@
}
void *f1_const_a(int x, void *p, const A * q) {
- void *r = x ? p : q; // expected-warning{{initializing 'void *' from an expression of type 'void const *' discards qualifiers}}
+ void *r = x ? p : q; // expected-warning{{initializing 'void *' with an expression of type 'void const *' discards qualifiers}}
return r;
}
diff --git a/test/SemaObjC/message.m b/test/SemaObjC/message.m
index fc4bfcc..fed3961 100644
--- a/test/SemaObjC/message.m
+++ b/test/SemaObjC/message.m
@@ -87,7 +87,7 @@
int test5(int X) {
int a = [X somemsg]; // expected-warning {{receiver type 'int' is not 'id'}} \
expected-warning {{method '-somemsg' not found}} \
- expected-warning {{incompatible pointer to integer conversion initializing 'int' from an expression of type 'id'}}
+ expected-warning {{incompatible pointer to integer conversion initializing 'int' with an expression of type 'id'}}
int b = [S somemsg]; // expected-error {{bad receiver type 'struct S'}}
}
diff --git a/test/SemaObjC/warn-write-strings.m b/test/SemaObjC/warn-write-strings.m
index c0b7741..04af00c 100644
--- a/test/SemaObjC/warn-write-strings.m
+++ b/test/SemaObjC/warn-write-strings.m
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -verify -fsyntax-only -Wwrite-strings %s
// PR4804
-char* x = "foo"; // expected-warning {{initializing 'char *' from an expression of type 'char const [4]' discards qualifiers}}
+char* x = "foo"; // expected-warning {{initializing 'char *' with an expression of type 'char const [4]' discards qualifiers}}