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.
On Thu, Sep 19, 2013 at 5:56 PM, Eli Friedman <[email protected]>wrote: > On Thu, Sep 19, 2013 at 3:38 PM, Kaelyn Uhrain <[email protected]> wrote: > >> 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 >> > > Are you sure you don't mean MicrosoftMode? > > Also, missing testcase. > > -Eli >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
