[PATCH] D50901: [clang][ubsan] Split Implicit Integer Truncation Sanitizer into unsigned and signed checks
Vedant Kumar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 22 11:49:28 PDT 2018
vsk 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;
----------------
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.
================
Comment at: test/CodeGen/catch-implicit-signed-integer-truncations-basics-negatives.c:17
+__attribute__((no_sanitize("integer"))) signed char blacklist_1_convert_signed_int_to_signed_char(signed int x) {
+ // CHECK: }
+ return x;
----------------
Ditto, I think this applies to the rest of the tests.
Repository:
rC Clang
https://reviews.llvm.org/D50901
More information about the cfe-commits
mailing list