Revised wording for diagnostics in r208299

llvm-svn: 208401
This commit is contained in:
Ismail Pazarbasi 2014-05-09 09:49:29 +00:00
parent 8bbadc0383
commit 77c456be3e
2 changed files with 4 additions and 4 deletions

View File

@ -205,7 +205,7 @@ def err_expected_semi_after_static_assert : Error<
"expected ';' after static_assert">;
def err_expected_semi_for : Error<"expected ';' in 'for' statement specifier">;
def err_single_decl_assign_in_for_range : Error<
"range based for statement requires ':' after range declaration">;
"range-based 'for' statement uses ':', not '='">;
def warn_missing_selector_name : Warning<
"%0 used as the name of the previous parameter rather than as part "
"of the selector">,

View File

@ -44,18 +44,18 @@ struct Vector {
void f() {
Vector v;
int a[] = {1, 2, 3, 4};
for (auto foo = a) // expected-error {{range based for statement requires ':' after range declaration}}
for (auto foo = a) // expected-error {{range-based 'for' statement uses ':', not '='}}
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:19-[[@LINE-1]]:20}:":"
(void)foo;
for (auto i
=
v) // expected-error@-1 {{range based for statement requires ':' after range declaration}}
v) // expected-error@-1 {{range-based 'for' statement uses ':', not '='}}
// CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:7-[[@LINE-2]]:8}:":"
(void)i;
#define FORRANGE(v, a) for (DECLVARWITHINIT(v) a) // expected-note {{expanded from macro}}
#define DECLAUTOVAR(v) auto v
#define DECLVARWITHINIT(v) DECLAUTOVAR(v) = // expected-note {{expanded from macro}}
FORRANGE(i, a) { // expected-error {{range based for statement requires ':' after range declaration}}
FORRANGE(i, a) { // expected-error {{range-based 'for' statement uses ':', not '='}}
}
}