<div dir="ltr"><pre class="">- switch (CandidateSet.BestViableFunction(S, From->getLocStart(), Best, true)) {
+ OverloadingResult OVLReasult =
+ CandidateSet.BestViableFunction(S, From->getLocStart(), Best, true);
+ switch (OVLReasult) {
</pre><div>Please move the variable declaration into the switch:</div><div><br></div><div>switch (auto Result = CandidateSet.BestViableFunction(...))</div><div class="gmail_extra"><br></div><div class="gmail_extra">Otherwise, LGTM, thanks!</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 13, 2015 at 3:54 PM, jahanian <span dir="ltr"><<a href="mailto:fjahanian@apple.com" target="_blank">fjahanian@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">This patch fixes a crash in release build clang and produces the desired diagnostic.<div>In the debug build clang it does not crash but produces a misleading diagnostic.</div><div><br></div><div>Problem is that in <font face="Menlo"><span style="font-size:11px">TryUserDefinedConversion(…)</span></font></div><div><font face="Menlo"><span style="font-size:11px">We have: </span></font></div><div><div style="margin:0px;font-size:11px;font-family:Menlo"><span style="color:rgb(187,44,162)">case</span> OR_Deleted:</div></div><div style="margin:0px;font-size:11px;font-family:Menlo">// ….</div><div style="margin:0px;font-size:11px;font-family:Menlo"><div style="margin:0px"><span style="color:rgb(187,44,162)">if</span> (CXXConstructorDecl *Constructor</div><div style="margin:0px"> = dyn_cast<CXXConstructorDecl>(ICS.UserDefined.ConversionFunction)) {</div><div style="margin:0px">// …</div><div style="margin:0px">}</div><div style="margin:0px"><br></div><div style="margin:0px">And ICS.UserDefined.ConversionFunction never gets set for a ‘delete’ constructor.</div></div><div><br></div><div>Please review.</div><div><br></div><div>- Fariborz</div><div><br></div><div><br></div><div><span style="white-space:pre-wrap"> </span></div></div><br><div style="word-wrap:break-word"><div></div></div><br></blockquote></div><br></div></div>