Skip to content

Commit 7571045

Browse files
authored
Merge pull request #256 from plum-umd/master_test_sync
Test sync with BigRefactor_master
2 parents a69114b + 636f57f commit 7571045

File tree

269 files changed

+284
-536
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

269 files changed

+284
-536
lines changed

clang/test/CheckedCRewriter/alloc_type_param.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// RUN: cconv-standalone -alltypes %S/alloc_type_param.checked.c -- | count 0
66
// RUN: rm %S/alloc_type_param.checked.c
77

8-
typedef unsigned long size_t;
8+
#include <stddef.h>
99
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
1010
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);
1111
extern _Itype_for_any(T) void *realloc(void *pointer : itype(_Array_ptr<T>) byte_count(1), size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrboth.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ through invalid pointer arithmetic, an unsafe cast, etc.*/
1818
/*********************************************************************************/
1919

2020

21-
typedef unsigned long size_t;
22-
#define NULL 0
21+
#include <stddef.h>
2322
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
2423
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
2524
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrbothmulti1.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ through invalid pointer arithmetic, an unsafe cast, etc.*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrbothmulti2.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ through invalid pointer arithmetic, an unsafe cast, etc.*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrboundsbasic.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ Basic array bounds tests (without any data-flow analysis).
66
*/
77

88

9-
typedef unsigned long size_t;
9+
#include <stddef.h>
1010

11-
#define NULL 0
1211
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
1312
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
1413
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrboundsbasicinfer.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ Basic array bounds tests (without any data-flow analysis).
66
*/
77

88

9-
typedef unsigned long size_t;
9+
#include <stddef.h>
1010

11-
#define NULL 0
1211
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);
1312

1413

clang/test/CheckedCRewriter/arrboundsbyte.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Array bounds (byte_bound) tests with data-flow analysis.
66
*/
77

8-
typedef unsigned long size_t;
8+
#include <stddef.h>
99
_Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);
1010
int *memcpy(int * restrict dest : itype(restrict _Array_ptr<int>) byte_count(n),
1111
const int * restrict src : itype(restrict _Array_ptr<const int>) byte_count(n),

clang/test/CheckedCRewriter/arrboundsheuristics.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
int *glob;
99
int lenplusone;
10-
typedef unsigned long size_t;
10+
#include <stddef.h>
1111
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);
1212
//CHECK_ALL: _Array_ptr<int> glob = ((void *)0);
1313
//CHECK_NOALL: int *glob;

clang/test/CheckedCRewriter/arrboundsinfer2.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ Basic array bounds tests (without any data-flow analysis).
66
*/
77

88

9-
typedef unsigned long size_t;
9+
#include <stddef.h>
1010

11-
#define NULL 0
1211
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);
1312
extern void ext_func(_Array_ptr<int> arr: count(len), unsigned len);
1413

clang/test/CheckedCRewriter/arrcallee.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc*/
1818
/*********************************************************************************/
1919

2020

21-
typedef unsigned long size_t;
22-
#define NULL 0
21+
#include <stddef.h>
2322
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
2423
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
2524
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrcalleemulti1.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrcalleemulti2.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrcaller.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc.*/
1818
/*********************************************************************************/
1919

2020

21-
typedef unsigned long size_t;
22-
#define NULL 0
21+
#include <stddef.h>
2322
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
2423
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
2524
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrcallermulti1.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc.*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrcallermulti2.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc.*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrinstructboth.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ through invalid pointer arithmetic, an unsafe cast, etc.*/
1818
/*********************************************************************************/
1919

2020

21-
typedef unsigned long size_t;
22-
#define NULL 0
21+
#include <stddef.h>
2322
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
2423
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
2524
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrinstructbothmulti1.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ through invalid pointer arithmetic, an unsafe cast, etc.*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrinstructbothmulti2.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ through invalid pointer arithmetic, an unsafe cast, etc.*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrinstructcallee.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc*/
1818
/*********************************************************************************/
1919

2020

21-
typedef unsigned long size_t;
22-
#define NULL 0
21+
#include <stddef.h>
2322
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
2423
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
2524
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrinstructcalleemulti1.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrinstructcalleemulti2.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrinstructcaller.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc.*/
1818
/*********************************************************************************/
1919

2020

21-
typedef unsigned long size_t;
22-
#define NULL 0
21+
#include <stddef.h>
2322
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
2423
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
2524
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrinstructcallermulti1.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc.*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrinstructcallermulti2.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc.*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrinstructprotoboth.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ through invalid pointer arithmetic, an unsafe cast, etc.*/
2121
/*********************************************************************************/
2222

2323

24-
typedef unsigned long size_t;
25-
#define NULL 0
24+
#include <stddef.h>
2625
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
2726
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
2827
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrinstructprotocallee.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc*/
2121
/*********************************************************************************/
2222

2323

24-
typedef unsigned long size_t;
25-
#define NULL 0
24+
#include <stddef.h>
2625
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
2726
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
2827
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrinstructprotocaller.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc.*/
2121
/*********************************************************************************/
2222

2323

24-
typedef unsigned long size_t;
25-
#define NULL 0
24+
#include <stddef.h>
2625
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
2726
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
2827
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrinstructprotosafe.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ while the definition for sus appears below them*/
2020
/*********************************************************************************/
2121

2222

23-
typedef unsigned long size_t;
24-
#define NULL 0
23+
#include <stddef.h>
2524
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
2625
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
2726
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrinstructsafe.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ field within a struct*/
1717
/*********************************************************************************/
1818

1919

20-
typedef unsigned long size_t;
21-
#define NULL 0
20+
#include <stddef.h>
2221
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
2322
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
2423
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrinstructsafemulti1.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ the tool performs conversions*/
2525
/*********************************************************************************/
2626

2727

28-
typedef unsigned long size_t;
29-
#define NULL 0
28+
#include <stddef.h>
3029
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3130
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3231
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrinstructsafemulti2.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ the tool performs conversions*/
2525
/*********************************************************************************/
2626

2727

28-
typedef unsigned long size_t;
29-
#define NULL 0
28+
#include <stddef.h>
3029
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3130
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3231
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrofstructboth.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ through invalid pointer arithmetic, an unsafe cast, etc.*/
1818
/*********************************************************************************/
1919

2020

21-
typedef unsigned long size_t;
22-
#define NULL 0
21+
#include <stddef.h>
2322
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
2423
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
2524
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrofstructbothmulti1.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ through invalid pointer arithmetic, an unsafe cast, etc.*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrofstructbothmulti2.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ through invalid pointer arithmetic, an unsafe cast, etc.*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrofstructcallee.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc*/
1818
/*********************************************************************************/
1919

2020

21-
typedef unsigned long size_t;
22-
#define NULL 0
21+
#include <stddef.h>
2322
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
2423
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
2524
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrofstructcalleemulti1.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrofstructcalleemulti2.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrofstructcaller.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc.*/
1818
/*********************************************************************************/
1919

2020

21-
typedef unsigned long size_t;
22-
#define NULL 0
21+
#include <stddef.h>
2322
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
2423
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
2524
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrofstructcallermulti1.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc.*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/CheckedCRewriter/arrofstructcallermulti2.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ not, through invalid pointer arithmetic, an unsafe cast, etc.*/
2626
/*********************************************************************************/
2727

2828

29-
typedef unsigned long size_t;
30-
#define NULL 0
29+
#include <stddef.h>
3130
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);
3231
extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
3332
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

0 commit comments

Comments
 (0)