summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/test/Analysis/casts.c10
-rw-r--r--clang/test/Analysis/misc-ps.m9
2 files changed, 10 insertions, 9 deletions
diff --git a/clang/test/Analysis/casts.c b/clang/test/Analysis/casts.c
index 947f63ef48b..96c0226a005 100644
--- a/clang/test/Analysis/casts.c
+++ b/clang/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/clang/test/Analysis/misc-ps.m b/clang/test/Analysis/misc-ps.m
index 2466dbe82e4..53b9b6f4fa6 100644
--- a/clang/test/Analysis/misc-ps.m
+++ b/clang/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);
- }
-}
OpenPOWER on IntegriCloud