<div dir="ltr">Which compiler gave that warning and in what situation?<br><br>In some cases it's advantageous to leave variables uninitialized if they aren't intended to be accessed before they're initialized by some other action - that way tools like MSan & static analysis can diagnose programmer errors where that initialization doesn't happen.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 11, 2019 at 8:39 AM Simon Pilgrim via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: Simon Pilgrim<br>
Date: 2019-11-10T11:21:43Z<br>
New Revision: a3c715e9788d829031989b0a5ea4eb43c7288be9<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/a3c715e9788d829031989b0a5ea4eb43c7288be9" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/a3c715e9788d829031989b0a5ea4eb43c7288be9</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/a3c715e9788d829031989b0a5ea4eb43c7288be9.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/a3c715e9788d829031989b0a5ea4eb43c7288be9.diff</a><br>
<br>
LOG: Twine - fix uninitialized variable warnings. NFCI.<br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
    llvm/include/llvm/ADT/Twine.h<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/llvm/include/llvm/ADT/Twine.h b/llvm/include/llvm/ADT/Twine.h<br>
index 4140c22aad3d..2dc7486c924f 100644<br>
--- a/llvm/include/llvm/ADT/Twine.h<br>
+++ b/llvm/include/llvm/ADT/Twine.h<br>
@@ -153,11 +153,11 @@ namespace llvm {<br>
<br>
     /// LHS - The prefix in the concatenation, which may be uninitialized for<br>
     /// Null or Empty kinds.<br>
-    Child LHS;<br>
+    Child LHS = {0};<br>
<br>
     /// RHS - The suffix in the concatenation, which may be uninitialized for<br>
     /// Null or Empty kinds.<br>
-    Child RHS;<br>
+    Child RHS = {0};<br>
<br>
     /// LHSKind - The NodeKind of the left hand side, \see getLHSKind().<br>
     NodeKind LHSKind = EmptyKind;<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>