r191046 - Don't correct typos in Sema::BuildCXXNestedNameSpecifier with -fms-extensions

Kaelyn Uhrain rikka at google.com
Thu Sep 19 15:38:48 PDT 2013


Author: rikka
Date: Thu Sep 19 17:38:48 2013
New Revision: 191046

URL: http://llvm.org/viewvc/llvm-project?rev=191046&view=rev
Log:
Don't correct typos in Sema::BuildCXXNestedNameSpecifier with -fms-extensions

When -fms-extensions is enabled, the typo correction was being called here on
non-error paths (as in test/SemaTemplate/lookup-dependent-bases.cpp) and correct
compilation depended on Sema::CorrectTypo not finding a viable candidate.

Modified:
    cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp

Modified: cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp?rev=191046&r1=191045&r2=191046&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp Thu Sep 19 17:38:48 2013
@@ -484,7 +484,7 @@ bool Sema::BuildCXXNestedNameSpecifier(S
   
   // FIXME: Deal with ambiguities cleanly.
 
-  if (Found.empty() && !ErrorRecoveryLookup) {
+  if (Found.empty() && !ErrorRecoveryLookup && !getLangOpts().MicrosoftExt) {
     // We haven't found anything, and we're not recovering from a
     // different kind of error, so look for typos.
     DeclarationName Name = Found.getLookupName();





More information about the cfe-commits mailing list