]> granicus.if.org Git - clang/commitdiff
Don't depend on system headers in clang -cc1 tests.
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 24 Jun 2010 11:06:12 +0000 (11:06 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 24 Jun 2010 11:06:12 +0000 (11:06 +0000)
The constant was copied from clang's limits.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106732 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/additive-folding-range-constraints.c
test/Analysis/additive-folding.c

index 1202328e91e8c26135d606c7d6d501208f862113..a8ca5d2e351dc2ed9fa68a390f979c62d42e40b5 100644 (file)
@@ -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 >).
index dd3308713ac1c6fcbbfb4e5798fe4dccbf88e04d..15d758800adc39c9d64c4c1014985471e72295de 100644 (file)
@@ -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