[cfe-commits] r106732 - in /cfe/trunk/test/Analysis: additive-folding-range-constraints.c additive-folding.c
Benjamin Kramer
benny.kra at googlemail.com
Thu Jun 24 04:06:12 PDT 2010
Author: d0k
Date: Thu Jun 24 06:06:12 2010
New Revision: 106732
URL: http://llvm.org/viewvc/llvm-project?rev=106732&view=rev
Log:
Don't depend on system headers in clang -cc1 tests.
The constant was copied from clang's limits.h.
Modified:
cfe/trunk/test/Analysis/additive-folding-range-constraints.c
cfe/trunk/test/Analysis/additive-folding.c
Modified: cfe/trunk/test/Analysis/additive-folding-range-constraints.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/additive-folding-range-constraints.c?rev=106732&r1=106731&r2=106732&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/additive-folding-range-constraints.c (original)
+++ cfe/trunk/test/Analysis/additive-folding-range-constraints.c Thu Jun 24 06:06:12 2010
@@ -1,11 +1,11 @@
// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-experimental-checks -verify -analyzer-constraints=range %s
-#include <limits.h>
// These are used to trigger warnings.
typedef typeof(sizeof(int)) size_t;
void *malloc(size_t);
void free(void *);
#define NULL ((void*)0)
+#define UINT_MAX (__INT_MAX__ *2U +1U)
// Each of these adjusted ranges has an adjustment small enough to split the
// solution range across an overflow boundary (Min for <, Max for >).
Modified: cfe/trunk/test/Analysis/additive-folding.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/additive-folding.c?rev=106732&r1=106731&r2=106732&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/additive-folding.c (original)
+++ cfe/trunk/test/Analysis/additive-folding.c Thu Jun 24 06:06:12 2010
@@ -1,12 +1,12 @@
// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-experimental-checks -verify -analyzer-constraints=basic %s
// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-experimental-checks -verify -analyzer-constraints=range %s
-#include <limits.h>
// These are used to trigger warnings.
typedef typeof(sizeof(int)) size_t;
void *malloc(size_t);
void free(void *);
#define NULL ((void*)0)
+#define UINT_MAX -1U
//---------------
// Plus/minus
More information about the cfe-commits
mailing list