summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2017-12-09 13:35:52 +0000
committerTim Northover <tnorthover@apple.com>2017-12-09 13:35:52 +0000
commit9595ecdaa969da106b922e08dc9d21a92ee1a438 (patch)
treea6b5e87692d605d5195398fd95ef296a2d3eca81 /test
parent610cf4cbe1552fb5c7b14ffd7248f193bd40026f (diff)
Update sanitizer tests for C++14 default in Clang
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320251 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/asan/TestCases/memcmp_test.cc4
-rw-r--r--test/msan/msan_print_shadow3.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/asan/TestCases/memcmp_test.cc b/test/asan/TestCases/memcmp_test.cc
index 3b3b8894b..0dd9820f5 100644
--- a/test/asan/TestCases/memcmp_test.cc
+++ b/test/asan/TestCases/memcmp_test.cc
@@ -7,8 +7,8 @@
#include <string.h>
int main(int argc, char **argv) {
- char a1[] = {argc, 2, 3, 4};
- char a2[] = {1, 2*argc, 3, 4};
+ char a1[] = {static_cast<char>(argc), 2, 3, 4};
+ char a2[] = {1, static_cast<char>(2*argc), 3, 4};
int res = memcmp(a1, a2, 4 + argc); // BOOM
// CHECK: AddressSanitizer: stack-buffer-overflow
// CHECK: {{#0.*memcmp}}
diff --git a/test/msan/msan_print_shadow3.cc b/test/msan/msan_print_shadow3.cc
index 478315279..410755e5d 100644
--- a/test/msan/msan_print_shadow3.cc
+++ b/test/msan/msan_print_shadow3.cc
@@ -6,11 +6,11 @@
int main(void) {
unsigned long long x = 0; // For 8-byte alignment.
- char x_s[4] = {0x87, 0x65, 0x43, 0x21};
+ char x_s[4] = {0x77, 0x65, 0x43, 0x21};
__msan_partial_poison(&x, &x_s, sizeof(x_s));
__msan_print_shadow(&x, sizeof(x_s));
return 0;
}
// CHECK: Shadow map of [{{.*}}), 4 bytes:
-// CHECK: 0x{{.*}}: 87654321 ........ ........ ........
+// CHECK: 0x{{.*}}: 77654321 ........ ........ ........