diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-06-03 12:22:01 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-06-03 12:22:01 +0000 |
commit | fcff57751247d534159e0b51177cad5cc3e18ae7 (patch) | |
tree | ad62f6079a647d3476c14c54c18243cd22905072 | |
parent | ecdb389dd38d4ae5012417464a42873ce280ba59 (diff) |
Minor cleanup for implicit int warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72770 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 7 | ||||
-rw-r--r-- | lib/Sema/SemaType.cpp | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 4095600564..41e73c1788 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -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< diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 81ac21123e..cd19d97c5b 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -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 |