r234591 - Initializing an uninitialized data member; should be NFC.

Aaron Ballman aaron at aaronballman.com
Fri Apr 10 08:06:04 PDT 2015


On Fri, Apr 10, 2015 at 11:03 AM, David Blaikie <dblaikie at gmail.com> wrote:
>
>
> On Fri, Apr 10, 2015 at 6:05 AM, Aaron Ballman <aaron at aaronballman.com>
> wrote:
>>
>> Author: aaronballman
>> Date: Fri Apr 10 08:05:04 2015
>> New Revision: 234591
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=234591&view=rev
>> Log:
>> Initializing an uninitialized data member; should be NFC.
>
>
> Was this being used uninitialized? Where?
>
> It's actually rather helpful to keep uninitialized members uninitiialized if
> they aren't intended to be used, so MSan et, al, can catch their use.

It was not, that I could tell. However, it was the only member to not
be initialized, and it is a public member of the class, which strikes
me as a dangerous code smell.

~Aaron



More information about the cfe-commits mailing list