I've make the fixes/changes based on your latest feedback and added a simplified unit test for one caller of CorrectTypo. The chosen caller is the one where requiresADL has to be propagated down to CorrectTypo to keep from breaking test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp<br>
<br><div class="gmail_quote">On Wed, Jun 22, 2011 at 1:23 PM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com" target="_blank">dgregor@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br></div>
+ // If there are results in the closest bucket, stop<br>
+ if (!DI->second.empty()<br>
+ /* TODO: Fix ObjC tests (in particular SemaObjC/ivar-ref-misuse.m) */<br>
+ || (getLangOptions().ObjC1 && ED > 0))<br>
+ break;<br>
<br>
Is this still an issue to be resolved?<br></blockquote><div><br>Yes. Removing the ObjC-specific guard results in SemaObjC/ivar-ref-misuse.m failing with the messages:<br><br> error: 'error' diagnostics expected but not seen: <br>
Line 20: use of undeclared identifier 'Xsprite'<br>error: 'error' diagnostics seen but not expected: <br> Line 20: unknown type name 'Xsprite'; did you mean 'Sprite'?<br> Line 20: expected identifier or '('<br>
error: 'note' diagnostics seen but not expected: <br> Line 3: 'Sprite' declared here<br><br>I'm not sure if it would be better to leave the guard in place or to fix up the test to account for the more diligent search for possible typo correction (given the meaning of much of the syntax in SemaObjC/ivar-ref-misuse.m is indecipherable to me).<br>
<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<div><br></div>
... and one larger issue, which is that I'm seeing an infinite loop on this test case:<br>
<br>
#include <vector><br>
#include <algorithm><br>
<br>
int main() {<br>
std::vector<int> v;<br>
(sort)(v.begin(), v.end());<br>
}<br>
<br>
in the typo-correction logic.<br></blockquote><div><br>D'oh! Found the problem and fixed it. <br></div></div><br>