[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/

Douglas Gregor dgregor at apple.com
Fri Feb 27 08:29:48 PST 2009


On Feb 27, 2009, at 8:02 AM, Sebastian Redl wrote:

> 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".


Right. My hope is that we can do something similar for C/C++/etc.

	- Doug



More information about the cfe-commits mailing list