<p dir="ltr"><br>
On Mar 9, 2016 8:18 AM, "Teresa Johnson" <<a href="mailto:tejohnson@google.com">tejohnson@google.com</a>> wrote:<br>
><br>
><br>
><br>
> On Wed, Mar 9, 2016 at 8:13 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
>><br>
>><br>
>> On Mar 9, 2016 8:11 AM, "Teresa Johnson via llvm-commits" <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
>> ><br>
>> > tejohnson added a subscriber: tejohnson.<br>
>> > tejohnson added a comment.<br>
>> ><br>
>> > Thanks for doing this!<br>
>> ><br>
>> > I will fix these 3, which one of my changes would have provoked. It is a benign case since we do have an assert at the use site checking the same condition that the inits are guarded with, but there is no reason not to 0 init these to avoid the bogus warning.<br>
>><br>
>> The reason not to is that it would silence msan catching the unintentional codepath (eg: if you didn't have the assert there, and they init and use conditions didn't match, msan would tell us - if we add what we believe to be a dead init, then msan no longer helps us here)<br>
><br>
><br>
> Hmm, ok. It's unfortunate that the warning and msan are at odds, although I don't know how to reconcile them. </p>
<p dir="ltr">The approach we've taken so far, so far as I'm aware, is to disable warnings like this that have such false positives.</p>
<p dir="ltr">> Will leave as is then. Is it worth a comment indicating why we are leaving them uninitialized?</p>
<p dir="ltr">Not sure. If you think it helps readability. If it's fairly clear the variable is only used under the same condition that it's initialized, I think you could leave it.</p>
<p dir="ltr">>><br>
>> ><br>
>> > Warning C4701 potentially uninitialized local variable 'FnEntry8BitAbbrev' used LLVMBitWriter c:\llvm\llvm\lib\bitcode\writer\bitcodewriter.cpp 2353<br>
>> > Warning C4701 potentially uninitialized local variable 'FnEntry7BitAbbrev' used LLVMBitWriter c:\llvm\llvm\lib\bitcode\writer\bitcodewriter.cpp 2357<br>
>> > Warning C4701 potentially uninitialized local variable 'FnEntry6BitAbbrev' used LLVMBitWriter c:\llvm\llvm\lib\bitcode\writer\bitcodewriter.cpp 2355<br>
>> ><br>
>> ><br>
>> > <a href="http://reviews.llvm.org/D17983">http://reviews.llvm.org/D17983</a><br>
>> ><br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > llvm-commits mailing list<br>
>> > <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
>> > <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
><br>
><br>
><br>
><br>
> -- <br>
> Teresa Johnson |<br>
> Software Engineer |<br>
> <a href="mailto:tejohnson@google.com">tejohnson@google.com</a> |<br>
> 408-460-2413</p>