================
@@ -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)) {
----------------
JustinStitt wrote:

Yes, fixed in 
[e964431](https://github.com/llvm/llvm-project/pull/80089/commits/e96443184c6059ab8c5b97badc9ecc7270d4d466)

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

Reply via email to