forked from OSchip/llvm-project
Remove the getDiagnosticLevel check since it doesn't buy us much.
llvm-svn: 119719
This commit is contained in:
parent
aa398c1617
commit
745f9996d0
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue