summaryrefslogtreecommitdiff
path: root/test/asan/TestCases/memcmp_test.cc
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/asan/TestCases/memcmp_test.cc
parent610cf4cbe1552fb5c7b14ffd7248f193bd40026f (diff)
downloadcompiler-rt-9595ecdaa969da106b922e08dc9d21a92ee1a438.tar.gz
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/asan/TestCases/memcmp_test.cc')
-rw-r--r--test/asan/TestCases/memcmp_test.cc4
1 files changed, 2 insertions, 2 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}}