forked from OSchip/llvm-project
Remove mid-optimizer warning. This situation should be handled differently,
such as by a compiler warning, a check in clang -fsanitizer=undefined, being optimized to unreachable, or a combination of the above. PR14722. llvm-svn: 171119
This commit is contained in:
parent
1b8c0750ee
commit
90053a1214
|
@ -1153,11 +1153,8 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) {
|
|||
|
||||
// If we are removing arguments to the function, emit an obnoxious warning.
|
||||
if (FT->getNumParams() < NumActualArgs) {
|
||||
if (!FT->isVarArg()) {
|
||||
FT->getContext().emitWarning("while resolving call to function '" +
|
||||
Callee->getName() +
|
||||
"' arguments were dropped");
|
||||
} else {
|
||||
// TODO: if (!FT->isVarArg()) this call may be unreachable. PR14722
|
||||
if (FT->isVarArg()) {
|
||||
// Add all of the arguments in their promoted form to the arg list.
|
||||
for (unsigned i = FT->getNumParams(); i != NumActualArgs; ++i, ++AI) {
|
||||
Type *PTy = getPromotedType((*AI)->getType());
|
||||
|
|
Loading…
Reference in New Issue