[cfe-commits] [patch] Warn on self assignment for member variables

Jordan Rose jordan_rose at apple.com
Thu Jun 28 16:57:46 PDT 2012


On Jun 28, 2012, at 16:55 , Nico Weber <thakis at chromium.org> wrote:

> Thanks, I landed the patch as is in r159394.
> 
> What do you want to typo correct? Check if the rhs ends with _, then check if there's a variable without the trailing _, and if so have a fixit to remove the trailing _?

I think the _ prefix/suffix thing is only moderately idiomatic; another idiom I've seen in our particular codebase is titlecase member variables and lowercase compiler args. I don't actually know anything about Sema's typo-correction, but I was hoping you could just say "if the instance variable wasn't a valid lookup result, what's the next nearest thing?" the way we do with real typos (that don't correspond to any existing identifier).



More information about the cfe-commits mailing list