[cfe-commits] r65570 - in /cfe/trunk: include/clang/Analysis/ include/clang/Basic/ include/clang/Driver/ include/clang/Parse/ lib/Analysis/ lib/Basic/ lib/Driver/ lib/Parse/ lib/Rewrite/ lib/Sema/ test/Parser/ test/SemaTemplate/

Sebastian Redl sebastian.redl at getdesigned.at
Fri Feb 27 08:02:33 PST 2009


Gabor Greif wrote:
>> In this future, we could consider hooking this mechanism up to the
>> rewriter to actually try to fix these problems during compilation (or,
>> after a compilation whose only errors have fixes). For now, however, I
>> suggest that we use these code modification hints whenever we can, so
>> that we get better diagnostics now and will have better coverage when
>> we find better ways to use this information.
>>     
>
>
> I had a very similar idea back in good old CodeWarrior days:
>
> The IDE could have added a small AppleScript to the diagnostic
> object, and a double-click on it would have run it, with the effect,
> that obvious syntax errors would have been almost auto-correcting
> (in a permanent way).
>   
Eclipse also has very similar functionality for Java. Many errors have
one or more options of auto-correcting. E.g. referencing an undefined
class offers "change to this similarly named class", "import this
correctly named class from this package", and "define a new class with
this name".

Sebastian



More information about the cfe-commits mailing list