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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119719 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Argyrios Kyrtzidis 2010-11-18 18:51:03 +00:00
Родитель 5807d9cce3
Коммит f4bed3f768
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

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