summaryrefslogtreecommitdiff
path: root/clang/test/Analysis/castsize.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/castsize.c')
-rw-r--r--clang/test/Analysis/castsize.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/clang/test/Analysis/castsize.c b/clang/test/Analysis/castsize.c
deleted file mode 100644
index 81aa60c0414c..000000000000
--- a/clang/test/Analysis/castsize.c
+++ /dev/null
@@ -1,26 +0,0 @@
-// RUN: %clang_analyze_cc1 -verify %s \
-// RUN: -analyzer-checker=core,unix.Malloc,alpha.core.CastSize
-
-typedef typeof(sizeof(int)) size_t;
-void *malloc(size_t);
-
-struct s1 {
- int a;
- char x[];
-};
-
-struct s2 {
- int a[100];
- char x[];
-};
-
-union u {
- struct s1 a;
- struct s2 b;
-};
-
-static union u *test() {
- union u *req;
- req = malloc(5); // expected-warning{{Cast a region whose size is not a multiple of the destination type size}}
- return req;
-}