<div dir="ltr">Fixed. cf. <span style="color:rgb(0,0,0)">r185058. </span><div><span style="color:rgb(0,0,0)"><br></span></div><div style><span style="color:rgb(0,0,0)">Thanks, </span></div><div style><span style="color:rgb(0,0,0)">-- Larisse.</span></div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 26, 2013 at 8:22 PM, Larisse Voufo <span dir="ltr"><<a href="mailto:lvoufo@google.com" target="_blank">lvoufo@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ah. Right. I'll fix that.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br>

<div class="gmail_quote">On Wed, Jun 26, 2013 at 7:09 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div>On Wed, Jun 26, 2013 at 6:50 PM, Larisse Voufo <span dir="ltr"><<a href="mailto:lvoufo@google.com" target="_blank">lvoufo@google.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: lvoufo<br>
Date: Wed Jun 26 20:50:25 2013<br>
New Revision: 185056<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=185056&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=185056&view=rev</a><br>
Log:<br>
Fix a conversion to incomplete type bug -- The error message now specifically states that the type is incomplete and points to the forward declaration of the incomplete type.<br>
<br>
Added:<br>
    cfe/trunk/test/SemaCXX/conversion-incomplete-type.cpp<br>
Modified:<br>
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td<br>
    cfe/trunk/lib/Sema/SemaInit.cpp<br>
    cfe/trunk/lib/Sema/SemaOverload.cpp<br>
<br>
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=185056&r1=185055&r2=185056&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=185056&r1=185055&r2=185056&view=diff</a><br>




==============================================================================<br>
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)<br>
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Wed Jun 26 20:50:25 2013<br>
@@ -5014,6 +5014,8 @@ def err_typecheck_ambiguous_condition :<br>
   "conversion %diff{from $ to $|between types}0,1 is ambiguous">;<br>
 def err_typecheck_nonviable_condition : Error<<br>
   "no viable conversion%diff{ from $ to $|}0,1">;<br>
+def err_typecheck_nonviable_condition_incomplete : Error<<br>
+  "no viable conversion%diff{ from $ to incomplete type $|}0,1">;<br>
 def err_typecheck_deleted_function : Error<<br>
   "conversion function %diff{from $ to $|between types}0,1 "<br>
   "invokes a deleted function">;<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaInit.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=185056&r1=185055&r2=185056&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=185056&r1=185055&r2=185056&view=diff</a><br>




==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaInit.cpp Wed Jun 26 20:50:25 2013<br>
@@ -6251,9 +6251,15 @@ bool InitializationSequence::Diagnose(Se<br>
       break;<br>
<br>
     case OR_No_Viable_Function:<br>
-      S.Diag(Kind.getLocation(), diag::err_typecheck_nonviable_condition)<br>
-        << Args[0]->getType() << DestType.getNonReferenceType()<br>
-        << Args[0]->getSourceRange();<br>
+      if (!DestType.getNonReferenceType()->isIncompleteType() ||<br>
+          !S.RequireCompleteType(Kind.getLocation(),<br>
+                                 DestType.getNonReferenceType(),<br>
+                          diag::err_typecheck_nonviable_condition_incomplete,<br>
+                               Args[0]->getType(), Args[0]->getSourceRange()))<br>
+        S.Diag(Kind.getLocation(), diag::err_typecheck_nonviable_condition)<br>
+          << Args[0]->getType() << Args[0]->getSourceRange()<br>
+          << DestType.getNonReferenceType();<br><br></blockquote></div></div><div>You don't need to call isIncompleteType() before calling RequireCompleteType(). <br></div></div><span><font color="#888888"><br>


</font></span></div><span><font color="#888888"><div class="gmail_extra">-Eli<br>
</div></font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>