Remove the getDiagnosticLevel check since it doesn't buy us much.

llvm-svn: 119719
This commit is contained in:
Argyrios Kyrtzidis 2010-11-18 18:51:03 +00:00
parent aa398c1617
commit 745f9996d0
1 changed files with 1 additions and 3 deletions

View File

@ -4874,9 +4874,7 @@ void Sema::DiagnoseSizeOfParametersAndReturnValue(ParmVarDecl * const *Param,
// Warn if the return value is pass-by-value and larger than the specified
// threshold.
if (ReturnTy->isPODType() &&
Diags.getDiagnosticLevel(diag::warn_return_value_size) !=
Diagnostic::Ignored) {
if (ReturnTy->isPODType()) {
unsigned Size = Context.getTypeSizeInChars(ReturnTy).getQuantity();
if (Size > LangOpts.NumLargeByValueCopy)
Diag(D->getLocation(), diag::warn_return_value_size)