[cfe-commits] r67823 - /cfe/trunk/lib/Sema/SemaType.cpp
Chris Lattner
clattner at apple.com
Thu Mar 26 22:50:15 PDT 2009
On Mar 26, 2009, at 10:10 PM, Douglas Gregor wrote:
> 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.
I don't get it, is the problem that the insertion point was wrong, or
that this was the first of a series of errors and the parser was just
confused?
-Chris
>
>
> 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.
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list