[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

Bill Wendling via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 22 14:47:18 PDT 2024


================
@@ -4093,6 +4109,11 @@ Value *ScalarExprEmitter::EmitAdd(const BinOpInfo &op) {
       op.RHS->getType()->isPointerTy())
     return emitPointerArithmetic(CGF, op, CodeGenFunction::NotSubtraction);
 
+  if ((op.Ty->isSignedIntegerOrEnumerationType() ||
----------------
bwendling wrote:

Is this early-exit necessary, or does the following processing not work?

https://github.com/llvm/llvm-project/pull/86618


More information about the cfe-commits mailing list