[PATCH] D50250: [clang][ubsan] Implicit Conversion Sanitizer - integer sign change - clang part

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 3 07:17:21 PDT 2018


erichkeane added inline comments.


================
Comment at: lib/CodeGen/CGExprScalar.cpp:1008
+  // We ignore conversions to/from pointer and/or bool.
+  if (!(SrcType->isIntegerType() && DstType->isIntegerType()))
+    return;
----------------
lebedev.ri wrote:
> erichkeane wrote:
> > I'd rather !SrcType->isInt || !DestType->isInt
> This i'd prefer to keep this as-is, since this is copied verbatim from `ScalarExprEmitter::EmitIntegerTruncationCheck()`.
If so much is being copied from EmitIntegerTruncationCheck, perhaps the two of these need to be the same function with an option/check on the sanitizer option on which it should do?


Repository:
  rC Clang

https://reviews.llvm.org/D50250





More information about the cfe-commits mailing list