================ @@ -1097,6 +1112,27 @@ void ScalarExprEmitter::EmitIntegerTruncationCheck(Value *Src, QualType SrcType, {Src, Dst}); } +static llvm::Value *EmitIsNegativeTestHelper(Value *V, QualType VType, + const char *Name, + CGBuilderTy &Builder) { + // NOTE: zero value is considered to be non-negative. ---------------- rjmccall wrote:
This is self-evident and does not need to be in a comment. Actually, most of the comments in this function are pretty unnecessary; you can just say something like "If the type is unsigned, the value is never negative." and leave everything else self-documenting. https://github.com/llvm/llvm-project/pull/75481 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits