Minor cleanup for implicit int warnings.

llvm-svn: 72770
This commit is contained in:
Eli Friedman 2009-06-03 12:22:01 +00:00
parent 4e627efc55
commit aef810900a
2 changed files with 4 additions and 7 deletions

View File

@ -1789,12 +1789,9 @@ def ext_invalid_sign_spec : Extension<"'%0' cannot be signed or unsigned">;
def warn_receiver_forward_class : Warning<
"receiver %0 is a forward class and corresponding @interface may not exist">;
def note_method_sent_forward_class : Note<"method %0 is used for the forward class">;
def warn_missing_declspec : ExtWarn<
def ext_missing_declspec : ExtWarn<
"declaration specifier missing, defaulting to 'int'">;
def warn_missing_type_specifier : Warning<
"type specifier missing, defaults to 'int'">,
InGroup<ImplicitInt>;
def warn_missing_type_specifier_c99 : ExtWarn<
def ext_missing_type_specifier : ExtWarn<
"type specifier missing, defaults to 'int'">,
InGroup<ImplicitInt>;
def err_decimal_unsupported : Error<

View File

@ -107,7 +107,7 @@ QualType Sema::ConvertDeclSpecToType(const DeclSpec &DS,
if (DS.isEmpty()) {
if (DeclLoc.isInvalid())
DeclLoc = DS.getSourceRange().getBegin();
Diag(DeclLoc, diag::warn_missing_declspec)
Diag(DeclLoc, diag::ext_missing_declspec)
<< DS.getSourceRange()
<< CodeModificationHint::CreateInsertion(DS.getSourceRange().getBegin(),
"int");
@ -125,7 +125,7 @@ QualType Sema::ConvertDeclSpecToType(const DeclSpec &DS,
Diag(DeclLoc, diag::err_missing_type_specifier)
<< DS.getSourceRange();
else
Diag(DeclLoc, diag::warn_missing_type_specifier)
Diag(DeclLoc, diag::ext_missing_type_specifier)
<< DS.getSourceRange();
// FIXME: If we could guarantee that the result would be well-formed, it