[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
Wed Aug 22 12:08:18 PDT 2018


lebedev.ri added inline comments.


================
Comment at: test/CodeGen/catch-implicit-integer-truncations-basics-negatives.c:23
+__attribute__((no_sanitize("integer"))) unsigned char blacklist_1_convert_unsigned_int_to_unsigned_char(unsigned int x) {
+  // CHECK: }
+  return x;
----------------
vsk wrote:
> It looks like 'CHECK: }' is meant to check that the end of the function is reached without any diagnostic handlers being emitted. If so, you'll need something stricter to actually check that.
> 
> Considering removing all of the 'CHECK: }' lines and adding `-implicit-check-not=__ubsan_handle_implicit` as a FileCheck option.
I already specify `-implicit-check-not="call void @__ubsan_handle_implicit_conversion"`.
As for the `// CHECK: }`, i know it doesn't do anything by itself, so i could indeed drop that indeed.


Repository:
  rC Clang

https://reviews.llvm.org/D50901





More information about the cfe-commits mailing list