diff options
author | Alp Toker <alp@nuanti.com> | 2014-01-14 12:51:41 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-01-14 12:51:41 +0000 |
commit | bfa3934f27e72bef75e41fded6d672a26938c414 (patch) | |
tree | 109d66490f3bd4d7a0fede600772e85d4aef5a96 /clang/lib/Sema/SemaExpr.cpp | |
parent | 8fc32f01dc5dcdf55152c7daac4e8c4cb511ccdb (diff) | |
download | bcm5719-llvm-bfa3934f27e72bef75e41fded6d672a26938c414.tar.gz bcm5719-llvm-bfa3934f27e72bef75e41fded6d672a26938c414.zip |
Rename language option MicrosoftMode to MSVCCompat
There's been long-standing confusion over the role of these two options. This
commit makes the necessary changes to differentiate them clearly, following up
from r198936.
MicrosoftExt (aka. fms-extensions):
Enable largely unobjectionable Microsoft language extensions to ease
portability. This mode, also supported by gcc, is used for building software
like FreeBSD and Linux kernel extensions that share code with Windows drivers.
MSVCCompat (aka. -fms-compatibility, formerly MicrosoftMode):
Turn on a special mode supporting 'heinous' extensions for drop-in
compatibility with the Microsoft Visual C++ product. Standards-compilant C and
C++ code isn't guaranteed to work in this mode. Implies MicrosoftExt.
Note that full -fms-compatibility mode is currently enabled by default on the
Windows target, which may need tuning to serve as a reasonable default.
See cfe-commits for the full discourse, thread 'r198497 - Move MS predefined
type_info out of InitializePredefinedMacros'
No change in behaviour.
llvm-svn: 199209
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index f479dc8ae56..8531286a9c7 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1733,7 +1733,7 @@ bool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, // Give a code modification hint to insert 'this->'. // TODO: fixit for inserting 'Base<T>::' in the other cases. // Actually quite difficult! - if (getLangOpts().MicrosoftMode) + if (getLangOpts().MSVCCompat) diagnostic = diag::warn_found_via_dependent_bases_lookup; if (isInstance) { Diag(R.getNameLoc(), diagnostic) << Name @@ -1799,7 +1799,7 @@ bool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, // function definition declared at class scope then we must set // DC to the lexical parent to be able to search into the parent // class. - if (getLangOpts().MicrosoftMode && isa<FunctionDecl>(DC) && + if (getLangOpts().MSVCCompat && isa<FunctionDecl>(DC) && cast<FunctionDecl>(DC)->getFriendObjectKind() && DC->getLexicalParent()->isRecord()) DC = DC->getLexicalParent(); @@ -2018,7 +2018,7 @@ ExprResult Sema::ActOnIdExpression(Scope *S, // unqualified name lookup. Any name lookup during template parsing means // clang might find something that MSVC doesn't. For now, we only handle // the common case of members of a dependent base class. - if (getLangOpts().MicrosoftMode) { + if (getLangOpts().MSVCCompat) { CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(CurContext); if (MD && MD->isInstance() && MD->getParent()->hasAnyDependentBases()) { assert(SS.isEmpty() && "qualifiers should be already handled"); |