diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2018-07-30 21:11:34 +0000 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2018-07-30 21:11:34 +0000 |
commit | 3eadc5926b0dc8a0a9479ca7e1cebbb414ff82ea (patch) | |
tree | b2bf1c6ddc83af5aadbd94ace0edc0f9b4124a9e /test/ubsan/TestCases/ImplicitConversion/integer-truncation-summary.cpp | |
parent | 81eee417591e5679d09ceef4bce705b4fda2477e (diff) |
[NFC] Rename test/ubsan/TestCases/{ImplicitCast => ImplicitConversion}
Just to be consistent with the rest.
I should have done that in the commit itself, but the filepaths
is one thing i forgot to verify :S
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@338307 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ubsan/TestCases/ImplicitConversion/integer-truncation-summary.cpp')
-rw-r--r-- | test/ubsan/TestCases/ImplicitConversion/integer-truncation-summary.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ubsan/TestCases/ImplicitConversion/integer-truncation-summary.cpp b/test/ubsan/TestCases/ImplicitConversion/integer-truncation-summary.cpp new file mode 100644 index 000000000..a92e01fb4 --- /dev/null +++ b/test/ubsan/TestCases/ImplicitConversion/integer-truncation-summary.cpp @@ -0,0 +1,13 @@ +// RUN: %clangxx -fsanitize=implicit-integer-truncation %s -o %t +// RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOTYPE +// RUN: %env_ubsan_opts=report_error_type=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-TYPE +// REQUIRES: !ubsan-standalone && !ubsan-standalone-static + +#include <stdint.h> + +int main() { + uint8_t t0 = (~(uint32_t(0))); + // CHECK-NOTYPE: SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior {{.*}}summary.cpp:[[@LINE-1]]:16 + // CHECK-TYPE: SUMMARY: UndefinedBehaviorSanitizer: implicit-integer-truncation {{.*}}summary.cpp:[[@LINE-2]]:16 + return 0; +} |