зеркало из https://github.com/microsoft/clang-1.git
change a diagnostic message from something pedantically correct but
useless to something more vague but hopefully more clear. rdar://6624173 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65639 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
7fa649f984
Коммит
51a75d0cc7
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче