[cfe-commits] r67823 - /cfe/trunk/lib/Sema/SemaType.cpp
Douglas Gregor
dgregor at apple.com
Thu Mar 26 23:01:04 PDT 2009
On Mar 26, 2009, at 10:50 PM, Chris Lattner wrote:
>
> 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?
It's the first of a series of errors. I think the root of the problem
is that we emit the "implicit int" warning well before we've actually
done the rest of the type checking for this declarator. That gives me
an idea: why not just make a note that we're potentially dealing with
an implicit int, and then only emit this warning/error after we've
successfully processed the declarator? Then, we omit the diagnostic
for semantic disasters, and when we do provide the diagnostic, the
code insertion hint is likely to be right.
- Doug
More information about the cfe-commits
mailing list