[cfe-commits] r164300 - in /cfe/trunk/test/Analysis: Inputs/system-header-simulator.h malloc-interprocedural.c
NAKAMURA Takumi
geek4civic at gmail.com
Thu Sep 20 04:03:56 PDT 2012
Author: chapuni
Date: Thu Sep 20 06:03:56 2012
New Revision: 164300
URL: http://llvm.org/viewvc/llvm-project?rev=164300&view=rev
Log:
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.
Modified:
cfe/trunk/test/Analysis/Inputs/system-header-simulator.h
cfe/trunk/test/Analysis/malloc-interprocedural.c
Modified: cfe/trunk/test/Analysis/Inputs/system-header-simulator.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/Inputs/system-header-simulator.h?rev=164300&r1=164299&r2=164300&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/Inputs/system-header-simulator.h (original)
+++ cfe/trunk/test/Analysis/Inputs/system-header-simulator.h Thu Sep 20 06:03:56 2012
@@ -15,7 +15,9 @@
// 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);
Modified: cfe/trunk/test/Analysis/malloc-interprocedural.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/malloc-interprocedural.c?rev=164300&r1=164299&r2=164300&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/malloc-interprocedural.c (original)
+++ cfe/trunk/test/Analysis/malloc-interprocedural.c Thu Sep 20 06:03:56 2012
@@ -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 *);
More information about the cfe-commits
mailing list