Skip to content

Commit 54d1bfd

Browse files
3C regression tests: Replace remaining size_t typedefs with stddef.h. (#453)
The one in liberal_itypes_ptr.c conflicted with the system headers on Windows X64. We haven't seen a problem with the one in allocator.c yet, but let's remove it too for consistency. Fixes #451.
1 parent 9e6f2d8 commit 54d1bfd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/test/3C/allocator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// RUN: 3c -base-dir=%t.checked %t.checked/allocator.c -- | diff %t.checked/allocator.c -
1010
// expected-no-diagnostics
1111
//
12-
typedef __SIZE_TYPE__ size_t;
12+
#include <stddef.h>
1313
_Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);
1414
_Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
1515

clang/test/3C/liberal_itypes_ptr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void biz() {
4141
// CHECK: b = buz();
4242
}
4343

44-
typedef unsigned long size_t;
44+
#include <stddef.h>
4545
_Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);
4646
_Itype_for_any(T) void free(void *pointer : itype(_Array_ptr<T>) byte_count(0));
4747

0 commit comments

Comments
 (0)