change a diagnostic message from something pedantically correct but

useless to something more vague but hopefully more clear.
rdar://6624173

llvm-svn: 65639
This commit is contained in:
Chris Lattner 2009-02-27 17:15:01 +00:00
parent 13454cfcb0
commit 7094c15d7e
4 changed files with 7 additions and 7 deletions

View File

@ -118,8 +118,8 @@ DIAG(err_expected_fn_body, ERROR,
"expected function body after function declarator")
DIAG(err_expected_method_body, ERROR,
"expected method body")
DIAG(err_expected_after_declarator, ERROR,
"expected '=', ',', ';', 'asm', or '__attribute__' after declarator")
DIAG(err_invalid_token_after_toplevel_declarator, ERROR,
"invalid token after top level declarator")
DIAG(err_expected_statement, ERROR,
"expected statement")
DIAG(err_expected_lparen_after, ERROR,

View File

@ -499,8 +499,8 @@ Parser::ParseDeclarationOrFunctionDefinition(
// FALL THROUGH.
} else if (DeclaratorInfo.isFunctionDeclarator() &&
(Tok.is(tok::l_brace) || // int X() {}
( !getLang().CPlusPlus &&
isDeclarationSpecifier() ))) { // int X(f) int f; {}
(!getLang().CPlusPlus &&
isDeclarationSpecifier()))) { // int X(f) int f; {}
if (DS.getStorageClassSpec() == DeclSpec::SCS_typedef) {
Diag(Tok, diag::err_function_declared_typedef);
@ -520,7 +520,7 @@ Parser::ParseDeclarationOrFunctionDefinition(
if (DeclaratorInfo.isFunctionDeclarator())
Diag(Tok, diag::err_expected_fn_body);
else
Diag(Tok, diag::err_expected_after_declarator);
Diag(Tok, diag::err_invalid_token_after_toplevel_declarator);
SkipUntil(tok::semi);
return 0;
}

View File

@ -26,7 +26,7 @@ next comment ends with a trigraph escaped newline: */
/* expected-warning {{escaped newline between}} expected-warning {{backslash and newline separated by space}} expected-warning {{trigraph ends block comment}} *??/
/
foo /* expected-error {{expected '=', ',', ';', 'asm', or '__attribute__' after declarator}} */
foo /* expected-error {{invalid token after top level declarator}} */
// rdar://6060752 - We should not get warnings about trigraphs in comments:

View File

@ -1,6 +1,6 @@
// RUN: clang -fsyntax-only -verify %s
ce MyList // expected-error {{expected '=', ',', ';', 'asm', or '__attribute__' after declarator}}
ce MyList // expected-error {{invalid token after top level declarator}}
@end