<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>This was preventing CodeGen for</div><div><br class="webkit-block-placeholder"></div><div>int ary[] = {1, 2, 3, 4};</div><div><br class="webkit-block-placeholder"></div><div>because the initializer's type was of the original decl's type with an element count of zero.</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>Index: Sema/SemaDecl.cpp</div><div>===================================================================</div><div>--- Sema/SemaDecl.cpp<span class="Apple-tab-span" style="white-space:pre">      </span>(revision 44432)</div><div>+++ Sema/SemaDecl.cpp<span class="Apple-tab-span" style="white-space:pre">        </span>(working copy)</div><div>@@ -727,8 +727,10 @@</div><div>   // completed by the initializer. For example: </div><div>   //   int ary[] = { 1, 3, 5 };</div><div>   // "ary" transitions from a VariableArrayType to a ConstantArrayType.</div><div>-  if (!VDecl->isInvalidDecl() && (DclT != SavT))</div><div>+  if (!VDecl->isInvalidDecl() && (DclT != SavT)) {</div><div>     VDecl->setType(DclT);</div><div>+    Init->setType(DclT);</div><div>+  }</div><div>     </div><div>   // Attach the initializer to the decl.</div><div>   VDecl->setInit(Init);</div><br><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Christopher Lamb</div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span> </div><br></body></html>