[PATCH] D50901: [clang][ubsan] Split Implicit Integer Truncation Sanitizer into unsigned and signed checks

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 18 13:46:43 PDT 2018


lebedev.ri added a comment.

@vsk thanks for taking a look!



================
Comment at: lib/CodeGen/CGExprScalar.cpp:305
   enum ImplicitConversionCheckKind : unsigned char {
-    ICCK_IntegerTruncation = 0,
+    ICCK_IntegerTruncation = 0, // Legacy, no longer used.
+    ICCK_UnsignedIntegerTruncation = 1,
----------------
vitalybuka wrote:
> why do you need to keep it?
*Here* - for consistency with the compiler-rt part.

There - what about mismatch in the used clang version
(which still only produced the `(ImplicitConversionCheckKind)0`), and compiler-rt version
(which has `(ImplicitConversionCheckKind)1` and `(ImplicitConversionCheckKind)2`)?
Is it 100.00% guaranteed not to happen? I'm not so sure.


Repository:
  rC Clang

https://reviews.llvm.org/D50901





More information about the cfe-commits mailing list