]> granicus.if.org Git - clang/commitdiff
Remove the code insertion hint for implicit int. Too often, we're wrong about this...
authorDouglas Gregor <dgregor@apple.com>
Fri, 27 Mar 2009 05:10:56 +0000 (05:10 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 27 Mar 2009 05:10:56 +0000 (05:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67823 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaType.cpp

index dbe19e3434c8e7c8d764f7a56a9f6bcd834bc9d9..21254ea0540ee41caa9e73b6a11483eb9cd9189d 100644 (file)
@@ -114,9 +114,12 @@ QualType Sema::ConvertDeclSpecToType(const DeclSpec &DS) {
       unsigned DK = getLangOptions().CPlusPlus && !getLangOptions().Microsoft?
           diag::err_missing_type_specifier
         : diag::warn_missing_type_specifier;
-      Diag(DS.getSourceRange().getBegin(), DK)
-        << CodeModificationHint::CreateInsertion(DS.getSourceRange().getBegin(),
-                                                 "int");
+      Diag(DS.getSourceRange().getBegin(), DK);
+
+      // FIXME: If we could guarantee that the result would be
+      // well-formed, it would be useful to have a code insertion hint
+      // here. However, after emitting this warning/error, we often
+      // emit other errors.
     }
       
     // FALL THROUGH.