Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 2f07baa

Browse files
committed
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
1 parent 86e8160 commit 2f07baa

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

include/clang/Basic/DiagnosticSemaKinds.td

+2-2
Original file line numberDiff line numberDiff line change
@@ -1553,7 +1553,7 @@ def warn_uninit_byref_blockvar_captured_by_block : Warning<
15531553
"block pointer variable %0 is uninitialized when captured by block">,
15541554
InGroup<Uninitialized>, DefaultIgnore;
15551555
def note_block_var_fixit_add_initialization : Note<
1556-
"maybe you meant to use __block %0">;
1556+
"did you mean to use __block %0">;
15571557
def note_in_omitted_aggregate_initializer : Note<
15581558
"in implicit initialization of %select{array element %1|field %1}0 "
15591559
"with omitted initializer">;
@@ -4800,7 +4800,7 @@ def error_arc_weak_ivar_access : Error<
48004800
def err_typecheck_member_reference_arrow : Error<
48014801
"member reference type %0 is not a pointer">;
48024802
def err_typecheck_member_reference_suggestion : Error<
4803-
"member reference type %0 is %select{a|not a}1 pointer; maybe you meant to use '%select{->|.}1'?">;
4803+
"member reference type %0 is %select{a|not a}1 pointer; did you mean to use '%select{->|.}1'?">;
48044804
def note_typecheck_member_reference_suggestion : Note<
48054805
"did you mean to use '.' instead?">;
48064806
def note_member_reference_arrow_from_operator_arrow : Note<

test/CXX/special/class.dtor/p10-0x.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ void a(const A *x, int i, int *pi) {
2727
y->~decltype(A())(); // expected-error{{use of undeclared identifier 'y'}}
2828

2929
typedef int *intp;
30-
i->~decltype(int())(); // expected-error{{member reference type 'int' is not a pointer; maybe you meant to use '.'?}}
30+
i->~decltype(int())(); // expected-error{{member reference type 'int' is not a pointer; did you mean to use '.'?}}
3131
i.~decltype(int())();
32-
i->~decltype(intp())(); // expected-error{{member reference type 'int' is not a pointer; maybe you meant to use '.'?}} \
32+
i->~decltype(intp())(); // expected-error{{member reference type 'int' is not a pointer; did you mean to use '.'?}} \
3333
expected-error{{the type of object expression ('int') does not match the type being destroyed ('decltype(intp())' (aka 'int *')) in pseudo-destructor expression}}
3434
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}}
3535
pi->~decltype(int())();

test/FixIt/fixit-recursive-block.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
int main() {
77
void (^arc_fail)() = ^() { // expected-warning {{block pointer variable 'arc_fail' is uninitialized when captured by block}} \
8-
// expected-note {{maybe you meant to use __block 'arc_fail'}}
8+
// expected-note {{did you mean to use __block 'arc_fail'}}
99
arc_fail(); // BOOM
1010
};
1111
}

test/FixIt/fixit.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ namespace PR15045 {
344344

345345
int f() {
346346
Cl0 c;
347-
return c->a; // expected-error {{member reference type 'PR15045::Cl0' is not a pointer; maybe you meant to use '.'?}}
347+
return c->a; // expected-error {{member reference type 'PR15045::Cl0' is not a pointer; did you mean to use '.'?}}
348348
}
349349
}
350350

test/Sema/member-reference.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ void g(void) {
2020
}
2121

2222
int PR17762(struct simple c) {
23-
return c->i; // expected-error {{member reference type 'struct simple' is not a pointer; maybe you meant to use '.'?}}
23+
return c->i; // expected-error {{member reference type 'struct simple' is not a pointer; did you mean to use '.'?}}
2424
}

test/SemaCXX/member-expr.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ namespace test5 {
8787
}
8888

8989
void test2(A &x) {
90-
x->A::foo<int>(); // expected-error {{'test5::A' is not a pointer; maybe you meant to use '.'?}}
90+
x->A::foo<int>(); // expected-error {{'test5::A' is not a pointer; did you mean to use '.'?}}
9191
}
9292
}
9393

@@ -181,7 +181,7 @@ namespace PR15045 {
181181

182182
int f() {
183183
Cl0 c;
184-
return c->a; // expected-error {{member reference type 'PR15045::Cl0' is not a pointer; maybe you meant to use '.'?}}
184+
return c->a; // expected-error {{member reference type 'PR15045::Cl0' is not a pointer; did you mean to use '.'?}}
185185
}
186186

187187
struct bar {
@@ -202,7 +202,7 @@ namespace PR15045 {
202202
foo f;
203203

204204
// Show that recovery has happened by also triggering typo correction
205-
e->Func(); // expected-error {{member reference type 'PR15045::bar' is not a pointer; maybe you meant to use '.'?}} \
205+
e->Func(); // expected-error {{member reference type 'PR15045::bar' is not a pointer; did you mean to use '.'?}} \
206206
// expected-error {{no member named 'Func' in 'PR15045::bar'; did you mean 'func'?}}
207207

208208
// Make sure a fixit isn't given in the case that the '->' isn't actually
@@ -221,6 +221,6 @@ namespace pr16676 {
221221
int f(S* s) {
222222
T t;
223223
return t.get_s // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}}
224-
.i; // expected-error {{member reference type 'pr16676::S *' is a pointer; maybe you meant to use '->'}}
224+
.i; // expected-error {{member reference type 'pr16676::S *' is a pointer; did you mean to use '->'}}
225225
}
226226
}

test/SemaCXX/pseudo-destructors.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void f(A* a, Foo *f, int *i, double *d, int ii) {
4646
i->N::~Integer(); // expected-error{{'Integer' does not refer to a type name in pseudo-destructor expression; expected the name of type 'int'}}
4747
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}}
4848

49-
ii->~Integer(); // expected-error{{member reference type 'int' is not a pointer; maybe you meant to use '.'?}}
49+
ii->~Integer(); // expected-error{{member reference type 'int' is not a pointer; did you mean to use '.'?}}
5050
ii.~Integer();
5151

5252
cv_test(a);

0 commit comments

Comments
 (0)