[cfe-commits] r140635 - /cfe/trunk/test/Analysis/malloc-overflow.c

Anna Zaks ganna at apple.com
Tue Sep 27 13:41:53 PDT 2011


Author: zaks
Date: Tue Sep 27 15:41:53 2011
New Revision: 140635

URL: http://llvm.org/viewvc/llvm-project?rev=140635&view=rev
Log:
[analyzer] Remove target triple from the malloc overflow test.

Modified:
    cfe/trunk/test/Analysis/malloc-overflow.c

Modified: cfe/trunk/test/Analysis/malloc-overflow.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/malloc-overflow.c?rev=140635&r1=140634&r2=140635&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/malloc-overflow.c (original)
+++ cfe/trunk/test/Analysis/malloc-overflow.c Tue Sep 27 15:41:53 2011
@@ -1,5 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.0 -analyze -analyzer-checker=experimental.security.MallocOverflow -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=experimental.security.MallocOverflow -verify %s
 
+#define NULL ((void *) 0)
 typedef __typeof__(sizeof(int)) size_t;
 extern void * malloc(size_t);
 
@@ -39,7 +40,6 @@
   return malloc((n + 1) * sizeof(int)); // expected-warning {{the computation of the size of the memory allocation may overflow}}
 }
 
-#include <stddef.h>
 extern void * malloc (size_t);
 
 void * f7(int n)
@@ -111,4 +111,3 @@
     return NULL;
   return malloc(n * sizeof(int));  // expected-warning {{the computation of the size of the memory allocation may overflow}}
 }
-





More information about the cfe-commits mailing list