<div dir="ltr">The problem is best explained with a testcase:<div><br></div><div><div>struct A {};</div><div>struct B {};</div><div><br></div><div>struct S {</div><div> void method(A*);</div><div> void method(B*);</div><div>
};</div><div><br></div><div>void test() {</div><div> B b;</div><div> S s;</div><div> s.methodd(&b);</div><div>}</div></div><div><br></div><div style>we currently typo-correct the "s.methodd" to "s.method" but refer to the NamedDecl* for "void method(A*);" both in the note and when continuing to parse. That in turn causes an extra diagnostics (can't convert B* to A*), but worse in my mind is the fact that the parser isn't recovering as though the suggested replacement text were applied.</div>
<div style><br></div><div style>Patch attached, now we recover by returning a LookupResult with all the overload candidates found by looking up the typo-corrected name, and we don't emit the note pointing to the previous decl(s) in case of overloaded results. Please review closely, I'm not very familiar with this part of clang.</div>
<div style><br></div><div style>Nick</div><div style><br></div></div>