================ @@ -3554,12 +3572,20 @@ Value *ScalarExprEmitter::EmitOverflowCheckedBinOp(const BinOpInfo &Ops) { const std::string *handlerName = &CGF.getLangOpts().OverflowHandler; if (handlerName->empty()) { - // If the signed-integer-overflow sanitizer is enabled, emit a call to its - // runtime. Otherwise, this is a -ftrapv check, so just emit a trap. - if (!isSigned || CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow)) { + // If the signed-integer-overflow or signed-integer-wrap sanitizer is + // enabled, emit a call to its runtime. Otherwise, this is a -ftrapv check, + // so just emit a trap. + if (!isSigned || CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow) || + CGF.SanOpts.has(SanitizerKind::SignedIntegerWrap)) { ---------------- nickdesaulniers wrote:
Should you be using `hasOneOf` here rather than `||`? https://github.com/llvm/llvm-project/pull/80089 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits