MSVC doesn't do any validation regarding exception specification.

llvm-svn: 131950
This commit is contained in:
Francois Pichet
2011-05-24 02:11:43 +00:00
parent 1a4f5123dd
commit a8032e96b5
3 changed files with 18 additions and 1 deletions

View File

@@ -714,7 +714,10 @@ bool Sema::CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New,
return false;
}
}
return CheckExceptionSpecSubset(PDiag(diag::err_override_exception_spec),
unsigned DiagID = diag::err_override_exception_spec;
if (getLangOptions().Microsoft)
DiagID = diag::warn_override_exception_spec;
return CheckExceptionSpecSubset(PDiag(DiagID),
PDiag(diag::note_overridden_virtual_function),
Old->getType()->getAs<FunctionProtoType>(),
Old->getLocation(),