From: Kaelyn Uhrain Date: Thu, 19 Sep 2013 22:38:48 +0000 (+0000) Subject: Don't correct typos in Sema::BuildCXXNestedNameSpecifier with -fms-extensions X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=152b7d82252b57763f4222fb4e3d0a4ed9937e76;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191046 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaCXXScopeSpec.cpp b/lib/Sema/SemaCXXScopeSpec.cpp index 327d55f0b3..f79ad2cc8c 100644 --- a/lib/Sema/SemaCXXScopeSpec.cpp +++ b/lib/Sema/SemaCXXScopeSpec.cpp @@ -484,7 +484,7 @@ bool Sema::BuildCXXNestedNameSpecifier(Scope *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();