<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 10, 2015 at 8:06 AM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Apr 10, 2015 at 11:03 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
><br>
><br>
> On Fri, Apr 10, 2015 at 6:05 AM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>><br>
> wrote:<br>
>><br>
>> Author: aaronballman<br>
>> Date: Fri Apr 10 08:05:04 2015<br>
>> New Revision: 234591<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=234591&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=234591&view=rev</a><br>
>> Log:<br>
>> Initializing an uninitialized data member; should be NFC.<br>
><br>
><br>
> Was this being used uninitialized? Where?<br>
><br>
> It's actually rather helpful to keep uninitialized members uninitiialized if<br>
> they aren't intended to be used, so MSan et, al, can catch their use.<br>
<br>
</span>It was not, that I could tell. However, it was the only member to not<br>
be initialized, and it is a public member of the class, which strikes<br>
me as a dangerous code smell.<br></blockquote><div><br>The danger is rather mitigated by having tools like MSan.<br><br>But in any case, there doesn't seem to be anything special about that member to warrant it being uninitialized while the others are initialized, as you say.<br><br>I had thought this might be one of the cases of a discriminated union that I've seen in other places, where initializing the non-active members really hinders MSan's ability to check that union accesses all only access the active members. But looking at it more closely that doesn't seem to be the case here - it's just one of a bunch of similar members, nothing special.<br><br>- David<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
~Aaron<br>
</font></span></blockquote></div><br></div></div>