[cfe-commits] r67823 - /cfe/trunk/lib/Sema/SemaType.cpp

Douglas Gregor dgregor at apple.com
Thu Mar 26 22:10:56 PDT 2009


Author: dgregor
Date: Fri Mar 27 00:10:56 2009
New Revision: 67823

URL: http://llvm.org/viewvc/llvm-project?rev=67823&view=rev
Log:
Remove the code insertion hint for implicit int. Too often, we're wrong about this hint, so it loses its usefulness. Maybe some day we can make the hint smart enough to be useful.

Modified:
    cfe/trunk/lib/Sema/SemaType.cpp

Modified: cfe/trunk/lib/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=67823&r1=67822&r2=67823&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaType.cpp (original)
+++ cfe/trunk/lib/Sema/SemaType.cpp Fri Mar 27 00:10:56 2009
@@ -114,9 +114,12 @@
       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.  





More information about the cfe-commits mailing list