[cfe-commits] PATCH: Adds -Wself-assign to Clang, but defaults it to off

Douglas Gregor dgregor at apple.com
Tue Jan 4 10:33:24 PST 2011


On Jan 4, 2011, at 9:23 AM, Chris Lattner wrote:

> 
> On Jan 4, 2011, at 7:41 AM, Douglas Gregor wrote:
> 
>>> 
>>> As a side note, the textual display for this hint is... terrible. =/ I'm wondering if we should look at a richer text display lest these diagnostics begin to hinder rather than help outside of an IDE.
>> 
>> We're pretty limited in what we can do in the terminal, but I'm open to ideas!
> 
> If there is a suitably complex rewrite, maybe it should print out the whole rewritten line, or the minimal single fragment that should be replaced?

We probably would want the smallest fragment of the rewritten line that covers the whole rewritten area (with rewritten parts in green), expanded to make sure we don't chop off tokens and placed as close to the actual code (horizontally) as possible. Sounds like a fun hack for someone.

	- Doug



More information about the cfe-commits mailing list