diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-01-05 11:47:58 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-01-05 11:47:58 +0000 |
commit | 0d1847d79eab28f0b1572d28ffb3d2eea07d1775 (patch) | |
tree | 00af6a5bbf53a7de0b086ae5e389636fb292d1cb | |
parent | 5ea95fc163e9fb4fd7506b6a0c26decd67022943 (diff) |
Add test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92724 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Analysis/misc-ps.m | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Analysis/misc-ps.m b/test/Analysis/misc-ps.m index 53b9b6f4fa..2466dbe82e 100644 --- a/test/Analysis/misc-ps.m +++ b/test/Analysis/misc-ps.m @@ -793,3 +793,12 @@ 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); + } +} |