<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 6, 2011, at 2:48 PM, Richard Trieu wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Changed the error message back to the original form.<br><br><div class="gmail_quote">On Fri, May 6, 2011 at 12:58 PM, Richard Trieu <span dir="ltr"><<a href="mailto:rtrieu@google.com">rtrieu@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Patch for PR7409.  Remove multiple error on invalid typedefs.  Once the first error is emitted, suppress additional errors when using the invalid typedefs.  Also, change the handling of types inside instantiations to be more descriptive.<div>

<br></div><div>Patch attached and available in Code Review:</div><div><a href="http://codereview.appspot.com/4430069/" target="_blank">http://codereview.appspot.com/4430069/</a></div>
</blockquote></div></blockquote></div><br><div><br></div><div><div>-      </div><div>-      SemaRef.Diag(TL.getBeginLoc(), diag::err_nested_name_spec_non_tag) </div><div>-        << TL.getType() << SS.getRange();</div><div>+      // If the namespace is an invalid type def, don't emit an error because</div><div><br></div><div>s/namespace/nested-name-specifier?</div><div><br></div><div>+      // a previous error should have already been emitted.</div><div><br></div><div>will have already been emitted, we hope :)</div><div><br></div><div>+      TypedefTypeLoc* TTL = dyn_cast<TypedefTypeLoc>(&TL);</div><div>+      if (!TTL || !TTL->getTypedefNameDecl()->isInvalidDecl()) {</div><div>+        SemaRef.Diag(TL.getBeginLoc(), diag::err_nested_name_spec_non_tag) </div><div>+          << TL.getType() << SS.getRange();</div><div>+      }</div><div>       return NestedNameSpecifierLoc();</div></div><div><br></div><div>Looks good, thanks!</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">       </span>- Doug</div></body></html>