[PATCH] D50902: [compiler-rt][ubsan] Split Implicit Integer Truncation Sanitizer into unsigned and signed checks

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 29 13:27:35 PDT 2018


lebedev.ri added inline comments.


================
Comment at: test/ubsan/TestCases/ImplicitConversion/signed-integer-truncation-summary.cpp:10
+  uint8_t t0 = int32_t(-1);
+  // CHECK-NOTYPE: SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior {{.*}}summary.cpp:[[@LINE-1]]:16
+  // CHECK-TYPE: SUMMARY: UndefinedBehaviorSanitizer: implicit-signed-integer-truncation {{.*}}summary.cpp:[[@LINE-2]]:16
----------------
filcab wrote:
> Can't we simply not test on the SUMMARY line (test on the error line) and allow standalone too? I don't see what we gain by restricting the test.
That summary line is the very essence of what we are checking in this test.
We can only do that in non-standalone builds, because standalone builds only print generic `undefined-behavior` error name, while ubsan is coupled with some other sanitizer, an actual error name is printed.
We have discussed this with you in https://reviews.llvm.org/D48959#inline-429528


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D50902





More information about the llvm-commits mailing list