<div dir="ltr">This is actually a fix related to another change I'm working on; teaching typo correction to look inside of classes like it does for namespaces breaks the valid-only-with-ms-extensions-enabled code in test/SemaTemplate/lookup-dependent-bases.cpp because typo correction will then succeed here. I don't know enough about -fms-extensions to know if it is possible to trigger the same misbehavior using only namespaces but suspect it isn't.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 19, 2013 at 5:56 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="im">On Thu, Sep 19, 2013 at 3:38 PM, Kaelyn Uhrain <span dir="ltr"><<a href="mailto:rikka@google.com" target="_blank">rikka@google.com</a>></span> wrote:<br>

</div><div class="gmail_extra"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rikka<br>
Date: Thu Sep 19 17:38:48 2013<br>
New Revision: 191046<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=191046&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=191046&view=rev</a><br>
Log:<br>
Don't correct typos in Sema::BuildCXXNestedNameSpecifier with -fms-extensions<br>
<br>
When -fms-extensions is enabled, the typo correction was being called here on<br>
non-error paths (as in test/SemaTemplate/lookup-dependent-bases.cpp) and correct<br>
compilation depended on Sema::CorrectTypo not finding a viable candidate.<br>
<br>
Modified:<br>
    cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp?rev=191046&r1=191045&r2=191046&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp?rev=191046&r1=191045&r2=191046&view=diff</a><br>



==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp Thu Sep 19 17:38:48 2013<br>
@@ -484,7 +484,7 @@ bool Sema::BuildCXXNestedNameSpecifier(S<br>
<br>
   // FIXME: Deal with ambiguities cleanly.<br>
<br>
-  if (Found.empty() && !ErrorRecoveryLookup) {<br>
+  if (Found.empty() && !ErrorRecoveryLookup && !getLangOpts().MicrosoftExt) {<br>
     // We haven't found anything, and we're not recovering from <br></blockquote><div><br></div></div><div>Are you sure you don't mean MicrosoftMode?<br><br></div><div>Also, missing testcase.<span class="HOEnZb"><font color="#888888"><br>
<br>-Eli <br></font></span></div>
</div></div></div>
</blockquote></div><br></div>