From: Zhongxing Xu Date: Tue, 5 Jan 2010 11:49:21 +0000 (+0000) Subject: Move test case to a more appropriate file. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6607aca723992d364f2de15f5d739aae8c2a6469;p=clang Move test case to a more appropriate file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92725 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Analysis/casts.c b/test/Analysis/casts.c index 947f63ef48..96c0226a00 100644 --- a/test/Analysis/casts.c +++ b/test/Analysis/casts.c @@ -45,3 +45,13 @@ void f2(const char *str) { if(!cl) cl = 'a'; } + +// Test cast VariableSizeArray to pointer does not crash. +void *memcpy(void *, void const *, unsigned long); +typedef unsigned char Byte; +void doit(char *data, int len) { + if (len) { + Byte buf[len]; + memcpy(buf, data, len); + } +} diff --git a/test/Analysis/misc-ps.m b/test/Analysis/misc-ps.m index 2466dbe82e..53b9b6f4fa 100644 --- a/test/Analysis/misc-ps.m +++ b/test/Analysis/misc-ps.m @@ -793,12 +793,3 @@ void test_bad_msg(TestBadArg *p) { [p testBadArg:y]; // expected-warning{{Pass-by-value argument in message expression is undefined}} } -// Test cast VariableSizeArray to pointer does not crash. -void *memcpy(void *, void const *, unsigned long); -typedef unsigned char Byte; -void doit(char *data, int len) { - if (len) { - Byte buf[len]; - memcpy(buf, data, len); - } -}