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

Nico Weber thakis at chromium.org
Mon Jun 25 16:27:22 PDT 2012


On Mon, Jun 25, 2012 at 3:49 PM, Jordan Rose <jordan_rose at apple.com> wrote:
>
> On Jun 25, 2012, at 14:43 , Nico Weber <thakis at chromium.org> wrote:
>
>> Full build of the 'chrome' target with this warning on my MBP: real   31m41.500s
>> Same clang binary at the same revision, without the warning: real     31m53.572s
>>
>> So the compile-time impact of the warning is below noise I'd say.
>>
>> Nico
>
> Did you remember to add a guard around the "work" part of CheckIdentityMemvarAssignment? Or were you still doing the work and just not emitting the warning?

I uncommented the call to "CheckIdentityMemvarAssignment" (and clang
warned me that the static function CheckIdentityMemvarAssignment
wasn't used). With "same binary" I meant "built at the same revision"

>
> ("Same binary" always makes me wary.)
>
> Jordan




More information about the cfe-commits mailing list