diff options
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 6ad8584469..164fb2f1c2 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -280,7 +280,7 @@ bool Sema::isMicrosoftMissingTypename(const CXXScopeSpec *SS) { if (Context.hasSameUnqualifiedType(QualType(Ty, 1), Base->getType())) return true; } - return false; + return CurContext->isFunctionOrMethod(); } bool Sema::DiagnoseUnknownTypeName(const IdentifierInfo &II, @@ -362,7 +362,7 @@ bool Sema::DiagnoseUnknownTypeName(const IdentifierInfo &II, << &II << DC << SS->getRange(); else if (isDependentScopeSpecifier(*SS)) { unsigned DiagID = diag::err_typename_missing; - if (getLangOptions().MicrosoftExt && isMicrosoftMissingTypename(SS)) + if (getLangOptions().MicrosoftMode && isMicrosoftMissingTypename(SS)) DiagID = diag::warn_typename_missing; Diag(SS->getRange().getBegin(), DiagID) |