<div dir="ltr"><div>Maybe you could use Sema::DiagnoseUnknownTypeName instead? And teach that code to not perform typo correction in its call to isTemplateName; we have the same duplicate-diagnostics bug for a case like:<br>
</div><div><br></div><div>  template<typename T> struct Foobar;</div><div>  Goobar x;</div><div><br></div><div>... or, worse:</div><div><br></div><div>  template<typename T> void Foobar();</div><div>  Goobar x;</div>
<div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 3, 2013 at 11:38 AM, Nick Lewycky <span dir="ltr"><<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@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"><div><div class="h5">On 27 August 2013 15:57, Nick Lewycky <span dir="ltr"><<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div><div>On 27 August 2013 00:54, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br><div class="gmail_extra">

<div class="gmail_quote">
<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 dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">



<div>On Tue, Aug 27, 2013 at 12:49 AM, Nick Lewycky <span dir="ltr"><<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.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 class="gmail_extra">Good catch. Foo could be a template function (or a template variable in C++14 I suppose) instead of a template class. That I know how to fix.</div>




</blockquote><div><br></div></div><div>Yikes, hadn't even thought of the cases when it was the wrong kind of template-id....</div><div><div> </div><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 class="gmail_extra">Unfortunately, the template typo correction is wired into LookupTemplateName. Even if I bypass isTemplateName and create a LookupResult with diagnostics suppressed, we still get the typo corrections. I do not know the design of clang well enough to know how to change that.</div>




</blockquote></div></div><br>Yea, not saying you need to fix, saying it's worth a PR or something to track. Maybe talk to Kaelyn so its on her or Richard's radar to look at it. I'm imagining things like 'sorte' -> 'sort' instead of 'sort' -> 'sorter'. Maybe I'm too worried, but I'd like to make sure we don't lose track of this issue.</div>




</div>
</blockquote></div><br></div></div></div><div class="gmail_extra">Fixed. ClassifyName doesn't do typo correction (unless you ask it to). Testcases added.</div><div class="gmail_extra"><br></div><div class="gmail_extra">


Please review!</div></div></blockquote><div></div></div><br></div></div></div><div class="gmail_extra">Ping! Same patch reattached.</div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra"><br></div><div class="gmail_extra">
Nick</div></font></span></div>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div></div>