mirror of https://github.com/microsoft/clang.git
Unify warnings/errors from "maybe you meant" to "did you mean".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233981 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
86e8160575
commit
2f07baafb2
|
@ -1553,7 +1553,7 @@ def warn_uninit_byref_blockvar_captured_by_block : Warning<
|
|||
"block pointer variable %0 is uninitialized when captured by block">,
|
||||
InGroup<Uninitialized>, DefaultIgnore;
|
||||
def note_block_var_fixit_add_initialization : Note<
|
||||
"maybe you meant to use __block %0">;
|
||||
"did you mean to use __block %0">;
|
||||
def note_in_omitted_aggregate_initializer : Note<
|
||||
"in implicit initialization of %select{array element %1|field %1}0 "
|
||||
"with omitted initializer">;
|
||||
|
@ -4800,7 +4800,7 @@ def error_arc_weak_ivar_access : Error<
|
|||
def err_typecheck_member_reference_arrow : Error<
|
||||
"member reference type %0 is not a pointer">;
|
||||
def err_typecheck_member_reference_suggestion : Error<
|
||||
"member reference type %0 is %select{a|not a}1 pointer; maybe you meant to use '%select{->|.}1'?">;
|
||||
"member reference type %0 is %select{a|not a}1 pointer; did you mean to use '%select{->|.}1'?">;
|
||||
def note_typecheck_member_reference_suggestion : Note<
|
||||
"did you mean to use '.' instead?">;
|
||||
def note_member_reference_arrow_from_operator_arrow : Note<
|
||||
|
|
|
@ -27,9 +27,9 @@ void a(const A *x, int i, int *pi) {
|
|||
y->~decltype(A())(); // expected-error{{use of undeclared identifier 'y'}}
|
||||
|
||||
typedef int *intp;
|
||||
i->~decltype(int())(); // expected-error{{member reference type 'int' is not a pointer; maybe you meant to use '.'?}}
|
||||
i->~decltype(int())(); // expected-error{{member reference type 'int' is not a pointer; did you mean to use '.'?}}
|
||||
i.~decltype(int())();
|
||||
i->~decltype(intp())(); // expected-error{{member reference type 'int' is not a pointer; maybe you meant to use '.'?}} \
|
||||
i->~decltype(intp())(); // expected-error{{member reference type 'int' is not a pointer; did you mean to use '.'?}} \
|
||||
expected-error{{the type of object expression ('int') does not match the type being destroyed ('decltype(intp())' (aka 'int *')) in pseudo-destructor expression}}
|
||||
i.~decltype(intp())(); // expected-error{{the type of object expression ('int') does not match the type being destroyed ('decltype(intp())' (aka 'int *')) in pseudo-destructor expression}}
|
||||
pi->~decltype(int())();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
int main() {
|
||||
void (^arc_fail)() = ^() { // expected-warning {{block pointer variable 'arc_fail' is uninitialized when captured by block}} \
|
||||
// expected-note {{maybe you meant to use __block 'arc_fail'}}
|
||||
// expected-note {{did you mean to use __block 'arc_fail'}}
|
||||
arc_fail(); // BOOM
|
||||
};
|
||||
}
|
||||
|
|
|
@ -344,7 +344,7 @@ namespace PR15045 {
|
|||
|
||||
int f() {
|
||||
Cl0 c;
|
||||
return c->a; // expected-error {{member reference type 'PR15045::Cl0' is not a pointer; maybe you meant to use '.'?}}
|
||||
return c->a; // expected-error {{member reference type 'PR15045::Cl0' is not a pointer; did you mean to use '.'?}}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,5 +20,5 @@ void g(void) {
|
|||
}
|
||||
|
||||
int PR17762(struct simple c) {
|
||||
return c->i; // expected-error {{member reference type 'struct simple' is not a pointer; maybe you meant to use '.'?}}
|
||||
return c->i; // expected-error {{member reference type 'struct simple' is not a pointer; did you mean to use '.'?}}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace test5 {
|
|||
}
|
||||
|
||||
void test2(A &x) {
|
||||
x->A::foo<int>(); // expected-error {{'test5::A' is not a pointer; maybe you meant to use '.'?}}
|
||||
x->A::foo<int>(); // expected-error {{'test5::A' is not a pointer; did you mean to use '.'?}}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -181,7 +181,7 @@ namespace PR15045 {
|
|||
|
||||
int f() {
|
||||
Cl0 c;
|
||||
return c->a; // expected-error {{member reference type 'PR15045::Cl0' is not a pointer; maybe you meant to use '.'?}}
|
||||
return c->a; // expected-error {{member reference type 'PR15045::Cl0' is not a pointer; did you mean to use '.'?}}
|
||||
}
|
||||
|
||||
struct bar {
|
||||
|
@ -202,7 +202,7 @@ namespace PR15045 {
|
|||
foo f;
|
||||
|
||||
// Show that recovery has happened by also triggering typo correction
|
||||
e->Func(); // expected-error {{member reference type 'PR15045::bar' is not a pointer; maybe you meant to use '.'?}} \
|
||||
e->Func(); // expected-error {{member reference type 'PR15045::bar' is not a pointer; did you mean to use '.'?}} \
|
||||
// expected-error {{no member named 'Func' in 'PR15045::bar'; did you mean 'func'?}}
|
||||
|
||||
// Make sure a fixit isn't given in the case that the '->' isn't actually
|
||||
|
@ -221,6 +221,6 @@ namespace pr16676 {
|
|||
int f(S* s) {
|
||||
T t;
|
||||
return t.get_s // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}}
|
||||
.i; // expected-error {{member reference type 'pr16676::S *' is a pointer; maybe you meant to use '->'}}
|
||||
.i; // expected-error {{member reference type 'pr16676::S *' is a pointer; did you mean to use '->'}}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ void f(A* a, Foo *f, int *i, double *d, int ii) {
|
|||
i->N::~Integer(); // expected-error{{'Integer' does not refer to a type name in pseudo-destructor expression; expected the name of type 'int'}}
|
||||
i->Integer::~Double(); // expected-error{{the type of object expression ('int') does not match the type being destroyed ('Double' (aka 'double')) in pseudo-destructor expression}}
|
||||
|
||||
ii->~Integer(); // expected-error{{member reference type 'int' is not a pointer; maybe you meant to use '.'?}}
|
||||
ii->~Integer(); // expected-error{{member reference type 'int' is not a pointer; did you mean to use '.'?}}
|
||||
ii.~Integer();
|
||||
|
||||
cv_test(a);
|
||||
|
|
Loading…
Reference in New Issue