summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2012-09-20 11:03:56 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2012-09-20 11:03:56 +0000
commit77369457e08deed067b1682080b7dad84246926c (patch)
treeec21c86ba7b3e62e7bf82a390c9eec20fda39bfd
parentb4f819086a61b5a843f0171a7467c5184ba1b086 (diff)
downloadbcm5719-llvm-77369457e08deed067b1682080b7dad84246926c.tar.gz
bcm5719-llvm-77369457e08deed067b1682080b7dad84246926c.zip
clang/test/Analysis: Fix the declaration of strlen() for 32 bit targets.
- Inputs/system-header-simulator.h: Declare strlen() with size_t. - malloc-interprocedural.c: Move the definition of size_t into the header above. Then XFAIL can be pruned. llvm-svn: 164300
-rw-r--r--clang/test/Analysis/Inputs/system-header-simulator.h4
-rw-r--r--clang/test/Analysis/malloc-interprocedural.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/clang/test/Analysis/Inputs/system-header-simulator.h b/clang/test/Analysis/Inputs/system-header-simulator.h
index 5790fb9cff4..e28b8906037 100644
--- a/clang/test/Analysis/Inputs/system-header-simulator.h
+++ b/clang/test/Analysis/Inputs/system-header-simulator.h
@@ -15,7 +15,9 @@ int fscanf(FILE *restrict, const char *restrict, ...);
// Note, on some platforms errno macro gets replaced with a function call.
extern int errno;
-unsigned long strlen(const char *);
+typedef __typeof(sizeof(int)) size_t;
+
+size_t strlen(const char *);
char *strcpy(char *restrict, const char *restrict);
diff --git a/clang/test/Analysis/malloc-interprocedural.c b/clang/test/Analysis/malloc-interprocedural.c
index 9d02daaa846..79cbf247dd9 100644
--- a/clang/test/Analysis/malloc-interprocedural.c
+++ b/clang/test/Analysis/malloc-interprocedural.c
@@ -1,10 +1,7 @@
// RUN: %clang_cc1 -analyze -analyzer-checker=unix.Malloc -analyzer-inline-max-stack-depth=5 -verify %s
-// XFAIL: cygwin,mingw32,win32
-
#include "Inputs/system-header-simulator.h"
-typedef __typeof(sizeof(int)) size_t;
void *malloc(size_t);
void *valloc(size_t);
void free(void *);
OpenPOWER on IntegriCloud