From 96871864d2433f98b643a687b8981beba19d3bc3 Mon Sep 17 00:00:00 2001 From: George Karpenkov Date: Sat, 31 Mar 2018 02:17:15 +0000 Subject: [PATCH] [analyzer] Hopefully fix the ARM buildbot. llvm-svn: 328913 --- clang/test/Analysis/bstring.c | 9 +++++++++ clang/test/Analysis/string.c | 10 ---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/clang/test/Analysis/bstring.c b/clang/test/Analysis/bstring.c index a671d9e..89a77cd 100644 --- a/clang/test/Analysis/bstring.c +++ b/clang/test/Analysis/bstring.c @@ -474,3 +474,12 @@ char radar_11125445_memcopythenlogfirstbyte(const char *input, size_t length) { free(bytes); return x; } + +struct S { + char f; +}; + +void nocrash_on_locint_offset(void *addr, void* from, struct S s) { + int iAdd = (int) addr; + memcpy(((void *) &(s.f)), from, iAdd); +} diff --git a/clang/test/Analysis/string.c b/clang/test/Analysis/string.c index 5bfa31e..e4a7482 100644 --- a/clang/test/Analysis/string.c +++ b/clang/test/Analysis/string.c @@ -30,7 +30,6 @@ typedef typeof(sizeof(int)) size_t; void clang_analyzer_eval(int); int scanf(const char *restrict format, ...); -void *memcpy(void *, const void *, unsigned long); //===----------------------------------------------------------------------=== // strlen() @@ -1187,12 +1186,3 @@ void strncpy_exactly_matching_buffer2(char *y) { // This time, we know that y fits in x anyway. clang_analyzer_eval(strlen(x) <= 3); // expected-warning{{UNKNOWN}} } - -struct S { - char f; -}; - -void nocrash_on_locint_offset(void *addr, void* from, struct S s) { - int iAdd = (int) addr; - memcpy(((void *) &(s.f)), from, iAdd); -} -- 2.7.4