diff --git a/clang/test/3C/3d-allocation.c b/clang/test/3C/3d-allocation.c index 9c80f6b427a7..6cda7180fd4b 100644 --- a/clang/test/3C/3d-allocation.c +++ b/clang/test/3C/3d-allocation.c @@ -8,9 +8,6 @@ #include #include -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); - int ***malloc3d(int y, int x, int z) { //CHECK_NOALL: int ***malloc3d(int y, int x, int z) : itype(_Ptr) { //CHECK_ALL: _Array_ptr<_Array_ptr<_Array_ptr>> malloc3d(int y, int x, int z) : count(y) { diff --git a/clang/test/3C/add_bounds.c b/clang/test/3C/add_bounds.c index 44ed32ac5255..478cdabe4b5d 100644 --- a/clang/test/3C/add_bounds.c +++ b/clang/test/3C/add_bounds.c @@ -35,8 +35,7 @@ void biz(){ //CHECK_ALL: _Array_ptr b : count(10) = a; } -#include -_Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr) byte_count(size); +#include _Array_ptr faz(void) { //CHECK_ALL: _Array_ptr faz(void) : count(100) { int *c = malloc(100 * sizeof(int)); diff --git a/clang/test/3C/alloc_type_param.c b/clang/test/3C/alloc_type_param.c index b510a4919384..76bacf6dd673 100644 --- a/clang/test/3C/alloc_type_param.c +++ b/clang/test/3C/alloc_type_param.c @@ -5,15 +5,7 @@ // RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/alloc_type_param.c -- | diff %t.checked/alloc_type_param.c - -#include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); +#include /* Check basic behavior with the three alloc functions */ void foo() { diff --git a/clang/test/3C/allocator.c b/clang/test/3C/allocator.c index 4bfd69be5033..7ed90938046d 100644 --- a/clang/test/3C/allocator.c +++ b/clang/test/3C/allocator.c @@ -9,10 +9,7 @@ // RUN: 3c -base-dir=%t.checked %t.checked/allocator.c -- | diff %t.checked/allocator.c - // expected-no-diagnostics // -#include -_Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -_Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); +#include void dosomething(void) { int a = 0; diff --git a/clang/test/3C/arrboundsbasic.c b/clang/test/3C/arrboundsbasic.c index 3b07149ba72c..29bb446be7ac 100644 --- a/clang/test/3C/arrboundsbasic.c +++ b/clang/test/3C/arrboundsbasic.c @@ -6,18 +6,7 @@ Basic array bounds tests (without any data-flow analysis). */ -#include - -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); +#include struct bar { char *a; diff --git a/clang/test/3C/arrboundsbasicinfer.c b/clang/test/3C/arrboundsbasicinfer.c index 63d6f1c4c6eb..3b79b67ac438 100644 --- a/clang/test/3C/arrboundsbasicinfer.c +++ b/clang/test/3C/arrboundsbasicinfer.c @@ -6,10 +6,7 @@ Basic array bounds tests (without any data-flow analysis). */ -#include - -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); +#include struct bar { char *a; diff --git a/clang/test/3C/arrboundsbyte.c b/clang/test/3C/arrboundsbyte.c index 1b483694645e..746d32f980de 100644 --- a/clang/test/3C/arrboundsbyte.c +++ b/clang/test/3C/arrboundsbyte.c @@ -6,14 +6,14 @@ Array bounds (byte_bound) tests with data-flow analysis. */ -#include -_Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -int *memcpy(int *restrict dest - : itype(restrict _Array_ptr) byte_count(n), - const int *restrict src - : itype(restrict _Array_ptr) byte_count(n), size_t n) +#include +// This test needs a custom version of memcpy where src and dest are `int *`. +int *memcpy_int(int *restrict dest + : itype(restrict _Array_ptr) byte_count(n), + const int *restrict src + : itype(restrict _Array_ptr) byte_count(n), size_t n) : itype(_Array_ptr) byte_count(n); + struct foo { int *y; int l; @@ -22,7 +22,7 @@ struct foo { void bar(int *x, int c) { struct foo f = {x, c}; int *q = malloc(sizeof(int) * c); - memcpy(q, f.y, c); + memcpy_int(q, f.y, c); } //CHECK: void bar(_Array_ptr x : byte_count(c), int c) { //CHECK: _Array_ptr q : count(c) = malloc(sizeof(int) * c); diff --git a/clang/test/3C/arrboundsheuristics.c b/clang/test/3C/arrboundsheuristics.c index 1336f5b7ab07..67ad63b2e7c8 100644 --- a/clang/test/3C/arrboundsheuristics.c +++ b/clang/test/3C/arrboundsheuristics.c @@ -10,9 +10,7 @@ int *glob; int lenplusone; -#include -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); +#include //CHECK_ALL: _Array_ptr glob = ((void *)0); //CHECK_NOALL: int *glob; diff --git a/clang/test/3C/arrboundsinfer2.c b/clang/test/3C/arrboundsinfer2.c index 1f9361b09c78..2fadae9fc6b6 100644 --- a/clang/test/3C/arrboundsinfer2.c +++ b/clang/test/3C/arrboundsinfer2.c @@ -6,10 +6,8 @@ Basic array bounds tests (without any data-flow analysis). */ -#include +#include -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); extern void ext_func(_Array_ptr arr : count(len), unsigned len); struct bar { diff --git a/clang/test/3C/arrctxsenbounds.c b/clang/test/3C/arrctxsenbounds.c index c56793b9542e..d0c2037d9df0 100644 --- a/clang/test/3C/arrctxsenbounds.c +++ b/clang/test/3C/arrctxsenbounds.c @@ -5,9 +5,7 @@ /* Context-sensitive array-bounds inference. */ -typedef long size_t; -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); +#include struct foo { int *x; unsigned olol; diff --git a/clang/test/3C/arrtests_xfail.c b/clang/test/3C/arrtests_xfail.c index abc8983ce8f1..b645ddfa7af6 100644 --- a/clang/test/3C/arrtests_xfail.c +++ b/clang/test/3C/arrtests_xfail.c @@ -8,16 +8,8 @@ Various array bounds tests. */ -#include -void *memset(void *dest - : byte_count(n), int c, size_t n) - : bounds(dest, (_Array_ptr)dest + n); -_Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -_Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); +#include +#include int *g; // array : count is 100; see the call to foo void foo(void) { diff --git a/clang/test/3C/b_tests/b10_allsafepointerstruct.c b/clang/test/3C/b_tests/b10_allsafepointerstruct.c index 4b2369aa0533..6be45c4c9d6b 100644 --- a/clang/test/3C/b_tests/b10_allsafepointerstruct.c +++ b/clang/test/3C/b_tests/b10_allsafepointerstruct.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b10_allsafepointerstruct.c -- | diff %t.checked/b10_allsafepointerstruct.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b11_calleestructnp.c b/clang/test/3C/b_tests/b11_calleestructnp.c index da80a3d302fc..bc8a4d6ce2d3 100644 --- a/clang/test/3C/b_tests/b11_calleestructnp.c +++ b/clang/test/3C/b_tests/b11_calleestructnp.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b11_calleestructnp.c -- | diff %t.checked/b11_calleestructnp.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b12_callerstructnp.c b/clang/test/3C/b_tests/b12_callerstructnp.c index 23db7e4ed05e..a825a6e8e9d5 100644 --- a/clang/test/3C/b_tests/b12_callerstructnp.c +++ b/clang/test/3C/b_tests/b12_callerstructnp.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b12_callerstructnp.c -- | diff %t.checked/b12_callerstructnp.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b13_calleestructp.c b/clang/test/3C/b_tests/b13_calleestructp.c index 14b3143b2dcf..198fd2141f5d 100644 --- a/clang/test/3C/b_tests/b13_calleestructp.c +++ b/clang/test/3C/b_tests/b13_calleestructp.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b13_calleestructp.c -- | diff %t.checked/b13_calleestructp.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b14_callerstructp.c b/clang/test/3C/b_tests/b14_callerstructp.c index 7c21598c9c91..ca182799db74 100644 --- a/clang/test/3C/b_tests/b14_callerstructp.c +++ b/clang/test/3C/b_tests/b14_callerstructp.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b14_callerstructp.c -- | diff %t.checked/b14_callerstructp.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b15_calleepointerstruct.c b/clang/test/3C/b_tests/b15_calleepointerstruct.c index af9098f18cc3..49e90d0e34c4 100644 --- a/clang/test/3C/b_tests/b15_calleepointerstruct.c +++ b/clang/test/3C/b_tests/b15_calleepointerstruct.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b15_calleepointerstruct.c -- | diff %t.checked/b15_calleepointerstruct.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b16_callerpointerstruct.c b/clang/test/3C/b_tests/b16_callerpointerstruct.c index 0c5dcb1e774e..6b0fc821040d 100644 --- a/clang/test/3C/b_tests/b16_callerpointerstruct.c +++ b/clang/test/3C/b_tests/b16_callerpointerstruct.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b16_callerpointerstruct.c -- | diff %t.checked/b16_callerpointerstruct.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b17_bothstructnp.c b/clang/test/3C/b_tests/b17_bothstructnp.c index 29c1ec640718..1b95bf06f367 100644 --- a/clang/test/3C/b_tests/b17_bothstructnp.c +++ b/clang/test/3C/b_tests/b17_bothstructnp.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b17_bothstructnp.c -- | diff %t.checked/b17_bothstructnp.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b18_bothstructp.c b/clang/test/3C/b_tests/b18_bothstructp.c index eda2e50c2a50..5307aba3e45d 100644 --- a/clang/test/3C/b_tests/b18_bothstructp.c +++ b/clang/test/3C/b_tests/b18_bothstructp.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b18_bothstructp.c -- | diff %t.checked/b18_bothstructp.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b19_bothpointerstruct.c b/clang/test/3C/b_tests/b19_bothpointerstruct.c index 41066a1453e1..f851848a6769 100644 --- a/clang/test/3C/b_tests/b19_bothpointerstruct.c +++ b/clang/test/3C/b_tests/b19_bothpointerstruct.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b19_bothpointerstruct.c -- | diff %t.checked/b19_bothpointerstruct.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b1_allsafe.c b/clang/test/3C/b_tests/b1_allsafe.c index 2d10889c8eed..19f1af154241 100644 --- a/clang/test/3C/b_tests/b1_allsafe.c +++ b/clang/test/3C/b_tests/b1_allsafe.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b1_allsafe.c -- | diff %t.checked/b1_allsafe.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include int *sus(int *x, int *y) { //CHECK_NOALL: _Ptr sus(int *x : itype(_Ptr), _Ptr y) { diff --git a/clang/test/3C/b_tests/b20_allsafepointerstructproto.c b/clang/test/3C/b_tests/b20_allsafepointerstructproto.c index 811f83f1edf7..c38f856631a4 100644 --- a/clang/test/3C/b_tests/b20_allsafepointerstructproto.c +++ b/clang/test/3C/b_tests/b20_allsafepointerstructproto.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b20_allsafepointerstructproto.c -- | diff %t.checked/b20_allsafepointerstructproto.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b21_calleepointerstructproto.c b/clang/test/3C/b_tests/b21_calleepointerstructproto.c index eb9551ddffaa..5597184d873c 100644 --- a/clang/test/3C/b_tests/b21_calleepointerstructproto.c +++ b/clang/test/3C/b_tests/b21_calleepointerstructproto.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b21_calleepointerstructproto.c -- | diff %t.checked/b21_calleepointerstructproto.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b22_callerpointerstructproto.c b/clang/test/3C/b_tests/b22_callerpointerstructproto.c index a4452432101f..1978f7557515 100644 --- a/clang/test/3C/b_tests/b22_callerpointerstructproto.c +++ b/clang/test/3C/b_tests/b22_callerpointerstructproto.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b22_callerpointerstructproto.c -- | diff %t.checked/b22_callerpointerstructproto.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b23_explicitunsafecast.c b/clang/test/3C/b_tests/b23_explicitunsafecast.c index f6f35a6879b6..8c5627e6160a 100644 --- a/clang/test/3C/b_tests/b23_explicitunsafecast.c +++ b/clang/test/3C/b_tests/b23_explicitunsafecast.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b23_explicitunsafecast.c -- | diff %t.checked/b23_explicitunsafecast.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include int *sus(int *x, int *y) { //CHECK_NOALL: _Ptr sus(int *x : itype(_Ptr), _Ptr y) { diff --git a/clang/test/3C/b_tests/b23_retswitchexplicit.c b/clang/test/3C/b_tests/b23_retswitchexplicit.c index 1ca070ef333f..dc1c305020ee 100644 --- a/clang/test/3C/b_tests/b23_retswitchexplicit.c +++ b/clang/test/3C/b_tests/b23_retswitchexplicit.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b23_retswitchexplicit.c -- | diff %t.checked/b23_retswitchexplicit.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include char *sus(int *x, int *y) { //CHECK_NOALL: char *sus(int *x : itype(_Ptr), _Ptr y) : itype(_Ptr) { diff --git a/clang/test/3C/b_tests/b24_implicitunsafecast.c b/clang/test/3C/b_tests/b24_implicitunsafecast.c index 105c9eb6572b..95f1c228ef39 100644 --- a/clang/test/3C/b_tests/b24_implicitunsafecast.c +++ b/clang/test/3C/b_tests/b24_implicitunsafecast.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b24_implicitunsafecast.c -- | diff %t.checked/b24_implicitunsafecast.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include int *sus(int *x, int *y) { //CHECK_NOALL: _Ptr sus(int *x : itype(_Ptr), _Ptr y) { diff --git a/clang/test/3C/b_tests/b24_retswitchimplicit.c b/clang/test/3C/b_tests/b24_retswitchimplicit.c index b34a4d5a2b3f..97422ff7038a 100644 --- a/clang/test/3C/b_tests/b24_retswitchimplicit.c +++ b/clang/test/3C/b_tests/b24_retswitchimplicit.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b24_retswitchimplicit.c -- | diff %t.checked/b24_retswitchimplicit.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include char *sus(int *x, int *y) { //CHECK_NOALL: _Ptr sus(int *x : itype(_Ptr), _Ptr y) { diff --git a/clang/test/3C/b_tests/b25_castprotosafe.c b/clang/test/3C/b_tests/b25_castprotosafe.c index f854317baf67..e3df2fc8d5f1 100644 --- a/clang/test/3C/b_tests/b25_castprotosafe.c +++ b/clang/test/3C/b_tests/b25_castprotosafe.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b25_castprotosafe.c -- | diff %t.checked/b25_castprotosafe.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include int *sus(int *, int *); //CHECK_NOALL: _Ptr sus(int *x : itype(_Ptr), _Ptr y); diff --git a/clang/test/3C/b_tests/b26_castprotounsafe.c b/clang/test/3C/b_tests/b26_castprotounsafe.c index 623f708e1cfc..17d2c22fc3da 100644 --- a/clang/test/3C/b_tests/b26_castprotounsafe.c +++ b/clang/test/3C/b_tests/b26_castprotounsafe.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b26_castprotounsafe.c -- | diff %t.checked/b26_castprotounsafe.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include int *sus(int *, int *); //CHECK_NOALL: _Ptr sus(int *x : itype(_Ptr), _Ptr y); diff --git a/clang/test/3C/b_tests/b26_castprotounsafeimplicit.c b/clang/test/3C/b_tests/b26_castprotounsafeimplicit.c index eb10b4fefbe1..b5138fff1d1f 100644 --- a/clang/test/3C/b_tests/b26_castprotounsafeimplicit.c +++ b/clang/test/3C/b_tests/b26_castprotounsafeimplicit.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b26_castprotounsafeimplicit.c -- | diff %t.checked/b26_castprotounsafeimplicit.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include int *sus(int *, int *); //CHECK_NOALL: _Ptr sus(int *x : itype(_Ptr), _Ptr y); diff --git a/clang/test/3C/b_tests/b26_castprotounsafeimplicitretswitch.c b/clang/test/3C/b_tests/b26_castprotounsafeimplicitretswitch.c index a77a467a92d7..fe050ca58a77 100644 --- a/clang/test/3C/b_tests/b26_castprotounsafeimplicitretswitch.c +++ b/clang/test/3C/b_tests/b26_castprotounsafeimplicitretswitch.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b26_castprotounsafeimplicitretswitch.c -- | diff %t.checked/b26_castprotounsafeimplicitretswitch.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include char *sus(int *, int *); //CHECK_NOALL: _Ptr sus(int *x : itype(_Ptr), _Ptr y); diff --git a/clang/test/3C/b_tests/b27_structcastsafe.c b/clang/test/3C/b_tests/b27_structcastsafe.c index 07c357e98e50..776a8198b12c 100644 --- a/clang/test/3C/b_tests/b27_structcastsafe.c +++ b/clang/test/3C/b_tests/b27_structcastsafe.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b27_structcastsafe.c -- | diff %t.checked/b27_structcastsafe.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b28_structcastexplicit.c b/clang/test/3C/b_tests/b28_structcastexplicit.c index 1edc9b09775f..589fc052f835 100644 --- a/clang/test/3C/b_tests/b28_structcastexplicit.c +++ b/clang/test/3C/b_tests/b28_structcastexplicit.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b28_structcastexplicit.c -- | diff %t.checked/b28_structcastexplicit.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b28_structcastimplicit.c b/clang/test/3C/b_tests/b28_structcastimplicit.c index 00d8e0e3eac3..a207836ae592 100644 --- a/clang/test/3C/b_tests/b28_structcastimplicit.c +++ b/clang/test/3C/b_tests/b28_structcastimplicit.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b28_structcastimplicit.c -- | diff %t.checked/b28_structcastimplicit.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b28_structimplicitretcast.c b/clang/test/3C/b_tests/b28_structimplicitretcast.c index be70810a778c..096cc766b1ae 100644 --- a/clang/test/3C/b_tests/b28_structimplicitretcast.c +++ b/clang/test/3C/b_tests/b28_structimplicitretcast.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b28_structimplicitretcast.c -- | diff %t.checked/b28_structimplicitretcast.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b29_structprotocastsafe.c b/clang/test/3C/b_tests/b29_structprotocastsafe.c index bdd19ac21081..d35fdef603c6 100644 --- a/clang/test/3C/b_tests/b29_structprotocastsafe.c +++ b/clang/test/3C/b_tests/b29_structprotocastsafe.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b29_structprotocastsafe.c -- | diff %t.checked/b29_structprotocastsafe.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b29_structprotocastsafeuseunsafe.c b/clang/test/3C/b_tests/b29_structprotocastsafeuseunsafe.c index c4d29cfe9ae9..0f323465db1e 100644 --- a/clang/test/3C/b_tests/b29_structprotocastsafeuseunsafe.c +++ b/clang/test/3C/b_tests/b29_structprotocastsafeuseunsafe.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b29_structprotocastsafeuseunsafe.c -- | diff %t.checked/b29_structprotocastsafeuseunsafe.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b2_calleeunsafe.c b/clang/test/3C/b_tests/b2_calleeunsafe.c index 244888c1c015..4ca1297289b7 100644 --- a/clang/test/3C/b_tests/b2_calleeunsafe.c +++ b/clang/test/3C/b_tests/b2_calleeunsafe.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b2_calleeunsafe.c -- | diff %t.checked/b2_calleeunsafe.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include int *sus(int *x, int *y) { //CHECK_NOALL: int *sus(int *x : itype(_Ptr), _Ptr y) : itype(_Ptr) { diff --git a/clang/test/3C/b_tests/b30_structprotocastexplicitunsafeuseunsafe.c b/clang/test/3C/b_tests/b30_structprotocastexplicitunsafeuseunsafe.c index 9724f978c2a3..a5ce30f61f05 100644 --- a/clang/test/3C/b_tests/b30_structprotocastexplicitunsafeuseunsafe.c +++ b/clang/test/3C/b_tests/b30_structprotocastexplicitunsafeuseunsafe.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b30_structprotocastexplicitunsafeuseunsafe.c -- | diff %t.checked/b30_structprotocastexplicitunsafeuseunsafe.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b30_structprotocastimplicitunsafeuseunsafe.c b/clang/test/3C/b_tests/b30_structprotocastimplicitunsafeuseunsafe.c index a4000f30b712..d612783e1a17 100644 --- a/clang/test/3C/b_tests/b30_structprotocastimplicitunsafeuseunsafe.c +++ b/clang/test/3C/b_tests/b30_structprotocastimplicitunsafeuseunsafe.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b30_structprotocastimplicitunsafeuseunsafe.c -- | diff %t.checked/b30_structprotocastimplicitunsafeuseunsafe.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b30_structprotocastunsafeexplicit.c b/clang/test/3C/b_tests/b30_structprotocastunsafeexplicit.c index 7dc38d974ce5..ae1ef97a771d 100644 --- a/clang/test/3C/b_tests/b30_structprotocastunsafeexplicit.c +++ b/clang/test/3C/b_tests/b30_structprotocastunsafeexplicit.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b30_structprotocastunsafeexplicit.c -- | diff %t.checked/b30_structprotocastunsafeexplicit.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b30_structprotocastunsafeimplicit.c b/clang/test/3C/b_tests/b30_structprotocastunsafeimplicit.c index cea277b91ac3..60537084def9 100644 --- a/clang/test/3C/b_tests/b30_structprotocastunsafeimplicit.c +++ b/clang/test/3C/b_tests/b30_structprotocastunsafeimplicit.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b30_structprotocastunsafeimplicit.c -- | diff %t.checked/b30_structprotocastunsafeimplicit.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b30_structprotocastunsafeimplicitretswitch.c b/clang/test/3C/b_tests/b30_structprotocastunsafeimplicitretswitch.c index e1d7549ef727..b6b0a95ea97b 100644 --- a/clang/test/3C/b_tests/b30_structprotocastunsafeimplicitretswitch.c +++ b/clang/test/3C/b_tests/b30_structprotocastunsafeimplicitretswitch.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b30_structprotocastunsafeimplicitretswitch.c -- | diff %t.checked/b30_structprotocastunsafeimplicitretswitch.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b30_structprotoconflict.c b/clang/test/3C/b_tests/b30_structprotoconflict.c index cf682e8757cf..158c53e5cbc2 100644 --- a/clang/test/3C/b_tests/b30_structprotoconflict.c +++ b/clang/test/3C/b_tests/b30_structprotoconflict.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b30_structprotoconflict.c -- | diff %t.checked/b30_structprotoconflict.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b30_structprotoconflictbodyconvert.c b/clang/test/3C/b_tests/b30_structprotoconflictbodyconvert.c index 88e8ca79717b..daefe046834f 100644 --- a/clang/test/3C/b_tests/b30_structprotoconflictbodyconvert.c +++ b/clang/test/3C/b_tests/b30_structprotoconflictbodyconvert.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b30_structprotoconflictbodyconvert.c -- | diff %t.checked/b30_structprotoconflictbodyconvert.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b3_onecallerunsafe.c b/clang/test/3C/b_tests/b3_onecallerunsafe.c index 2f0ed952a0df..a4f88688c401 100644 --- a/clang/test/3C/b_tests/b3_onecallerunsafe.c +++ b/clang/test/3C/b_tests/b3_onecallerunsafe.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b3_onecallerunsafe.c -- | diff %t.checked/b3_onecallerunsafe.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include int *sus(int *x, int *y) { //CHECK_NOALL: _Ptr sus(int *x : itype(_Ptr), _Ptr y) { diff --git a/clang/test/3C/b_tests/b4_bothunsafe.c b/clang/test/3C/b_tests/b4_bothunsafe.c index 6df056d6a236..3f6bf0ad71c1 100644 --- a/clang/test/3C/b_tests/b4_bothunsafe.c +++ b/clang/test/3C/b_tests/b4_bothunsafe.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b4_bothunsafe.c -- | diff %t.checked/b4_bothunsafe.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include int *sus(int *x, int *y) { //CHECK_NOALL: int *sus(int *x : itype(_Ptr), _Ptr y) : itype(_Ptr) { diff --git a/clang/test/3C/b_tests/b5_calleeunsafeproto.c b/clang/test/3C/b_tests/b5_calleeunsafeproto.c index 0e232e9ba254..0f27240a86ca 100644 --- a/clang/test/3C/b_tests/b5_calleeunsafeproto.c +++ b/clang/test/3C/b_tests/b5_calleeunsafeproto.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b5_calleeunsafeproto.c -- | diff %t.checked/b5_calleeunsafeproto.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include int *sus(int *, int *); //CHECK_NOALL: int *sus(int *x : itype(_Ptr), _Ptr y) : itype(_Ptr); diff --git a/clang/test/3C/b_tests/b6_callerunsafeproto.c b/clang/test/3C/b_tests/b6_callerunsafeproto.c index 4b9f06cbf174..abf1ad882a0d 100644 --- a/clang/test/3C/b_tests/b6_callerunsafeproto.c +++ b/clang/test/3C/b_tests/b6_callerunsafeproto.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b6_callerunsafeproto.c -- | diff %t.checked/b6_callerunsafeproto.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include int *sus(int *, int *); //CHECK_NOALL: _Ptr sus(int *x : itype(_Ptr), _Ptr y); diff --git a/clang/test/3C/b_tests/b7_allsafeproto.c b/clang/test/3C/b_tests/b7_allsafeproto.c index 5e3fc23315ce..4db8908bb82a 100644 --- a/clang/test/3C/b_tests/b7_allsafeproto.c +++ b/clang/test/3C/b_tests/b7_allsafeproto.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b7_allsafeproto.c -- | diff %t.checked/b7_allsafeproto.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include int *sus(int *, int *); //CHECK_NOALL: _Ptr sus(int *x : itype(_Ptr), _Ptr y); diff --git a/clang/test/3C/b_tests/b8_allsafestructnp.c b/clang/test/3C/b_tests/b8_allsafestructnp.c index 380e0c821db3..75bf80606846 100644 --- a/clang/test/3C/b_tests/b8_allsafestructnp.c +++ b/clang/test/3C/b_tests/b8_allsafestructnp.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b8_allsafestructnp.c -- | diff %t.checked/b8_allsafestructnp.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/b_tests/b9_allsafestructp.c b/clang/test/3C/b_tests/b9_allsafestructp.c index 09302e2b7750..160ef90bf9fa 100644 --- a/clang/test/3C/b_tests/b9_allsafestructp.c +++ b/clang/test/3C/b_tests/b9_allsafestructp.c @@ -5,20 +5,9 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/b9_allsafestructp.c -- | diff %t.checked/b9_allsafestructp.c - #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct np { int x; diff --git a/clang/test/3C/basic_checks.c b/clang/test/3C/basic_checks.c index 30c8bdbfe50a..b79f7171b885 100644 --- a/clang/test/3C/basic_checks.c +++ b/clang/test/3C/basic_checks.c @@ -9,7 +9,7 @@ // expected-no-diagnostics // -typedef unsigned short wchar_t; +#include void typd_driver(void) { wchar_t buf[10]; diff --git a/clang/test/3C/basic_inter_field_ntarr.c b/clang/test/3C/basic_inter_field_ntarr.c index 2b68b1aee07f..0d3a21bec646 100644 --- a/clang/test/3C/basic_inter_field_ntarr.c +++ b/clang/test/3C/basic_inter_field_ntarr.c @@ -7,11 +7,7 @@ // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - // -unsigned long strlen(const char *s : itype(_Nt_array_ptr)); -char *strstr(const char *s1 - : itype(_Nt_array_ptr), const char *s2 - : itype(_Nt_array_ptr)) - : itype(_Nt_array_ptr); +#include // This tests the propagation of constraints // within the fields of structure. typedef struct { diff --git a/clang/test/3C/basic_inter_ntarr.c b/clang/test/3C/basic_inter_ntarr.c index 6c8f59d4caa8..4092a5494629 100644 --- a/clang/test/3C/basic_inter_ntarr.c +++ b/clang/test/3C/basic_inter_ntarr.c @@ -6,10 +6,7 @@ // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - // -char *strstr(const char *s1 - : itype(_Nt_array_ptr), const char *s2 - : itype(_Nt_array_ptr)) - : itype(_Nt_array_ptr); +#include // here we test the propagation of constraints // between functions. diff --git a/clang/test/3C/basic_local_ntarr.c b/clang/test/3C/basic_local_ntarr.c index 17bc6d1c9a48..0ce32d584c5b 100644 --- a/clang/test/3C/basic_local_ntarr.c +++ b/clang/test/3C/basic_local_ntarr.c @@ -7,11 +7,7 @@ // RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused - // -unsigned long strlen(const char *s : itype(_Nt_array_ptr)); -char *strstr(const char *s1 - : itype(_Nt_array_ptr), const char *s2 - : itype(_Nt_array_ptr)) - : itype(_Nt_array_ptr); +#include // basic test // just create a NT pointer diff --git a/clang/test/3C/calloc.c b/clang/test/3C/calloc.c index 3a90e229818c..9afeb4e444d3 100644 --- a/clang/test/3C/calloc.c +++ b/clang/test/3C/calloc.c @@ -5,9 +5,7 @@ // RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/calloc.c -- | diff %t.checked/calloc.c - -#include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); +#include void func(int *x : itype(_Array_ptr)); //CHECK: void func(int *x : itype(_Array_ptr)); diff --git a/clang/test/3C/definedType.c b/clang/test/3C/definedType.c index 8da534eff2bb..0593f0849e47 100644 --- a/clang/test/3C/definedType.c +++ b/clang/test/3C/definedType.c @@ -5,24 +5,25 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/definedType.c -- | diff %t.checked/definedType.c - -#include -_Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); +#include // From issue 204 -#define ulong unsigned long +// Here, we specifically want to test 3C's behavior on a macro that expands to a +// type. Use a different name to avoid any confusion with the `ulong` that is +// defined as a typedef in sys/types.h on some systems. +#define my_ulong unsigned long -ulong *TOP; -// CHECK_NOALL: ulong *TOP; -// CHECK_ALL: _Array_ptr TOP = ((void *)0); -ulong channelColumns; +my_ulong *TOP; +// CHECK_NOALL: my_ulong *TOP; +// CHECK_ALL: _Array_ptr TOP = ((void *)0); +my_ulong channelColumns; void DescribeChannel(void) { - ulong col; - TOP = (ulong *)malloc((channelColumns + 1) * sizeof(ulong)); - // CHECK_ALL: TOP = (_Array_ptr)malloc((channelColumns + 1) * sizeof(ulong)); - // CHECK_NOALL: TOP = (ulong *)malloc((channelColumns + 1) * sizeof(ulong)); + my_ulong col; + TOP = (my_ulong *)malloc((channelColumns + 1) * sizeof(my_ulong)); + // CHECK_ALL: TOP = (_Array_ptr)malloc((channelColumns + 1) * sizeof(my_ulong)); + // CHECK_NOALL: TOP = (my_ulong *)malloc((channelColumns + 1) * sizeof(my_ulong)); TOP[col] = 0; } diff --git a/clang/test/3C/dont_rewrite.c b/clang/test/3C/dont_rewrite.c index b3277814fbb1..6289cd7589e3 100644 --- a/clang/test/3C/dont_rewrite.c +++ b/clang/test/3C/dont_rewrite.c @@ -2,11 +2,7 @@ // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -#include - -extern void *memset(void *dest - : byte_count(n), int c, size_t n) - : bounds(dest, (_Array_ptr)dest + n); +#include // don't mess with this _Itype_for_any(T) void vsf_sysutil_memclr(void *p_dest diff --git a/clang/test/3C/free.c b/clang/test/3C/free.c index 92e44002f936..d0a7395c8c67 100644 --- a/clang/test/3C/free.c +++ b/clang/test/3C/free.c @@ -2,10 +2,7 @@ // RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -#include -_Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); -_Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); +#include int *test() { // CHECK_NOALL: int *test(void) : itype(_Ptr) { diff --git a/clang/test/3C/generated_tests/arrboth.c b/clang/test/3C/generated_tests/arrboth.c index 25fa1f01c893..5ce4d8119577 100644 --- a/clang/test/3C/generated_tests/arrboth.c +++ b/clang/test/3C/generated_tests/arrboth.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrbothmulti1.c b/clang/test/3C/generated_tests/arrbothmulti1.c index 74382ff2d43d..b9b029c5fb1e 100644 --- a/clang/test/3C/generated_tests/arrbothmulti1.c +++ b/clang/test/3C/generated_tests/arrbothmulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrbothmulti2.c b/clang/test/3C/generated_tests/arrbothmulti2.c index 8a607b5bd208..7e1f3f5bf93d 100644 --- a/clang/test/3C/generated_tests/arrbothmulti2.c +++ b/clang/test/3C/generated_tests/arrbothmulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrcallee.c b/clang/test/3C/generated_tests/arrcallee.c index fca7bbeeb703..4ff1ac043a6b 100644 --- a/clang/test/3C/generated_tests/arrcallee.c +++ b/clang/test/3C/generated_tests/arrcallee.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrcalleemulti1.c b/clang/test/3C/generated_tests/arrcalleemulti1.c index fdb735db2f33..903332975af0 100644 --- a/clang/test/3C/generated_tests/arrcalleemulti1.c +++ b/clang/test/3C/generated_tests/arrcalleemulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrcalleemulti2.c b/clang/test/3C/generated_tests/arrcalleemulti2.c index 1f0841c0c412..0780cdb00c1c 100644 --- a/clang/test/3C/generated_tests/arrcalleemulti2.c +++ b/clang/test/3C/generated_tests/arrcalleemulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrcaller.c b/clang/test/3C/generated_tests/arrcaller.c index 479abd96fb28..2adb6c448150 100644 --- a/clang/test/3C/generated_tests/arrcaller.c +++ b/clang/test/3C/generated_tests/arrcaller.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrcallermulti1.c b/clang/test/3C/generated_tests/arrcallermulti1.c index 61c770900d35..c2f5bc204629 100644 --- a/clang/test/3C/generated_tests/arrcallermulti1.c +++ b/clang/test/3C/generated_tests/arrcallermulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrcallermulti2.c b/clang/test/3C/generated_tests/arrcallermulti2.c index 1803e75dd7ff..0d5870e7e507 100644 --- a/clang/test/3C/generated_tests/arrcallermulti2.c +++ b/clang/test/3C/generated_tests/arrcallermulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrinstructboth.c b/clang/test/3C/generated_tests/arrinstructboth.c index bf213796ea9f..36d80ae409c1 100644 --- a/clang/test/3C/generated_tests/arrinstructboth.c +++ b/clang/test/3C/generated_tests/arrinstructboth.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrinstructbothmulti1.c b/clang/test/3C/generated_tests/arrinstructbothmulti1.c index eb9d64940334..3c05909763be 100644 --- a/clang/test/3C/generated_tests/arrinstructbothmulti1.c +++ b/clang/test/3C/generated_tests/arrinstructbothmulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrinstructbothmulti2.c b/clang/test/3C/generated_tests/arrinstructbothmulti2.c index a01cbac26d37..4fefd5f72aee 100644 --- a/clang/test/3C/generated_tests/arrinstructbothmulti2.c +++ b/clang/test/3C/generated_tests/arrinstructbothmulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrinstructcallee.c b/clang/test/3C/generated_tests/arrinstructcallee.c index ad42570d88b4..a2dfd8816e62 100644 --- a/clang/test/3C/generated_tests/arrinstructcallee.c +++ b/clang/test/3C/generated_tests/arrinstructcallee.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrinstructcalleemulti1.c b/clang/test/3C/generated_tests/arrinstructcalleemulti1.c index c492e90dd2c6..6e9e45634928 100644 --- a/clang/test/3C/generated_tests/arrinstructcalleemulti1.c +++ b/clang/test/3C/generated_tests/arrinstructcalleemulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrinstructcalleemulti2.c b/clang/test/3C/generated_tests/arrinstructcalleemulti2.c index 044259959a9e..c27105bc6173 100644 --- a/clang/test/3C/generated_tests/arrinstructcalleemulti2.c +++ b/clang/test/3C/generated_tests/arrinstructcalleemulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrinstructcaller.c b/clang/test/3C/generated_tests/arrinstructcaller.c index dec6e999c711..995989752a08 100644 --- a/clang/test/3C/generated_tests/arrinstructcaller.c +++ b/clang/test/3C/generated_tests/arrinstructcaller.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrinstructcallermulti1.c b/clang/test/3C/generated_tests/arrinstructcallermulti1.c index 96bb79901156..4b03204ff246 100644 --- a/clang/test/3C/generated_tests/arrinstructcallermulti1.c +++ b/clang/test/3C/generated_tests/arrinstructcallermulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrinstructcallermulti2.c b/clang/test/3C/generated_tests/arrinstructcallermulti2.c index a9114ac8477e..1acfa3a89dc6 100644 --- a/clang/test/3C/generated_tests/arrinstructcallermulti2.c +++ b/clang/test/3C/generated_tests/arrinstructcallermulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrinstructprotoboth.c b/clang/test/3C/generated_tests/arrinstructprotoboth.c index baa0a15d9f71..a8101eb3516a 100644 --- a/clang/test/3C/generated_tests/arrinstructprotoboth.c +++ b/clang/test/3C/generated_tests/arrinstructprotoboth.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrinstructprotocallee.c b/clang/test/3C/generated_tests/arrinstructprotocallee.c index 3f25008af731..c40450f1840d 100644 --- a/clang/test/3C/generated_tests/arrinstructprotocallee.c +++ b/clang/test/3C/generated_tests/arrinstructprotocallee.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrinstructprotocaller.c b/clang/test/3C/generated_tests/arrinstructprotocaller.c index 386beb4e1683..02f0c661c8fd 100644 --- a/clang/test/3C/generated_tests/arrinstructprotocaller.c +++ b/clang/test/3C/generated_tests/arrinstructprotocaller.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrinstructprotosafe.c b/clang/test/3C/generated_tests/arrinstructprotosafe.c index aadf3024cb12..8f4506b97972 100644 --- a/clang/test/3C/generated_tests/arrinstructprotosafe.c +++ b/clang/test/3C/generated_tests/arrinstructprotosafe.c @@ -20,20 +20,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrinstructsafe.c b/clang/test/3C/generated_tests/arrinstructsafe.c index 74db580240de..db263ff8ccf0 100644 --- a/clang/test/3C/generated_tests/arrinstructsafe.c +++ b/clang/test/3C/generated_tests/arrinstructsafe.c @@ -16,20 +16,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrinstructsafemulti1.c b/clang/test/3C/generated_tests/arrinstructsafemulti1.c index c6e2efc7e439..a4d8c38109be 100644 --- a/clang/test/3C/generated_tests/arrinstructsafemulti1.c +++ b/clang/test/3C/generated_tests/arrinstructsafemulti1.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrinstructsafemulti2.c b/clang/test/3C/generated_tests/arrinstructsafemulti2.c index 93e22f8c9a65..eba9272ce25c 100644 --- a/clang/test/3C/generated_tests/arrinstructsafemulti2.c +++ b/clang/test/3C/generated_tests/arrinstructsafemulti2.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrofstructboth.c b/clang/test/3C/generated_tests/arrofstructboth.c index 9487cf921808..6f93aad9db47 100644 --- a/clang/test/3C/generated_tests/arrofstructboth.c +++ b/clang/test/3C/generated_tests/arrofstructboth.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrofstructbothmulti1.c b/clang/test/3C/generated_tests/arrofstructbothmulti1.c index ba1f3196be67..4655c0733c46 100644 --- a/clang/test/3C/generated_tests/arrofstructbothmulti1.c +++ b/clang/test/3C/generated_tests/arrofstructbothmulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrofstructbothmulti2.c b/clang/test/3C/generated_tests/arrofstructbothmulti2.c index 89f834e65f54..a7ea8805af6e 100644 --- a/clang/test/3C/generated_tests/arrofstructbothmulti2.c +++ b/clang/test/3C/generated_tests/arrofstructbothmulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrofstructcallee.c b/clang/test/3C/generated_tests/arrofstructcallee.c index 6115205c4d35..017fdbc4b3c3 100644 --- a/clang/test/3C/generated_tests/arrofstructcallee.c +++ b/clang/test/3C/generated_tests/arrofstructcallee.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrofstructcalleemulti1.c b/clang/test/3C/generated_tests/arrofstructcalleemulti1.c index 5e27a49400da..5fef6412456c 100644 --- a/clang/test/3C/generated_tests/arrofstructcalleemulti1.c +++ b/clang/test/3C/generated_tests/arrofstructcalleemulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrofstructcalleemulti2.c b/clang/test/3C/generated_tests/arrofstructcalleemulti2.c index 88c91d3a6128..1fae0a2b9a68 100644 --- a/clang/test/3C/generated_tests/arrofstructcalleemulti2.c +++ b/clang/test/3C/generated_tests/arrofstructcalleemulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrofstructcaller.c b/clang/test/3C/generated_tests/arrofstructcaller.c index 7288a05cde85..96fe2390f2bc 100644 --- a/clang/test/3C/generated_tests/arrofstructcaller.c +++ b/clang/test/3C/generated_tests/arrofstructcaller.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrofstructcallermulti1.c b/clang/test/3C/generated_tests/arrofstructcallermulti1.c index 9487aac47f44..afb24d071058 100644 --- a/clang/test/3C/generated_tests/arrofstructcallermulti1.c +++ b/clang/test/3C/generated_tests/arrofstructcallermulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrofstructcallermulti2.c b/clang/test/3C/generated_tests/arrofstructcallermulti2.c index 16ad1a75c3f7..5aefe2d37c56 100644 --- a/clang/test/3C/generated_tests/arrofstructcallermulti2.c +++ b/clang/test/3C/generated_tests/arrofstructcallermulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrofstructprotoboth.c b/clang/test/3C/generated_tests/arrofstructprotoboth.c index 481967b101e5..922344e4a381 100644 --- a/clang/test/3C/generated_tests/arrofstructprotoboth.c +++ b/clang/test/3C/generated_tests/arrofstructprotoboth.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrofstructprotocallee.c b/clang/test/3C/generated_tests/arrofstructprotocallee.c index c5329a76a719..be3522fbe01a 100644 --- a/clang/test/3C/generated_tests/arrofstructprotocallee.c +++ b/clang/test/3C/generated_tests/arrofstructprotocallee.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrofstructprotocaller.c b/clang/test/3C/generated_tests/arrofstructprotocaller.c index baab2d55baf8..e8b2f0f01ae4 100644 --- a/clang/test/3C/generated_tests/arrofstructprotocaller.c +++ b/clang/test/3C/generated_tests/arrofstructprotocaller.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrofstructprotosafe.c b/clang/test/3C/generated_tests/arrofstructprotosafe.c index d8c775cf72b1..1d3a5e198a26 100644 --- a/clang/test/3C/generated_tests/arrofstructprotosafe.c +++ b/clang/test/3C/generated_tests/arrofstructprotosafe.c @@ -20,20 +20,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrofstructsafe.c b/clang/test/3C/generated_tests/arrofstructsafe.c index 44fdd51e32d5..5de7f26dbe4b 100644 --- a/clang/test/3C/generated_tests/arrofstructsafe.c +++ b/clang/test/3C/generated_tests/arrofstructsafe.c @@ -16,20 +16,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrofstructsafemulti1.c b/clang/test/3C/generated_tests/arrofstructsafemulti1.c index 6ebc68e17e11..36fbced25268 100644 --- a/clang/test/3C/generated_tests/arrofstructsafemulti1.c +++ b/clang/test/3C/generated_tests/arrofstructsafemulti1.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrofstructsafemulti2.c b/clang/test/3C/generated_tests/arrofstructsafemulti2.c index 378d9939fc50..28a40d6040e8 100644 --- a/clang/test/3C/generated_tests/arrofstructsafemulti2.c +++ b/clang/test/3C/generated_tests/arrofstructsafemulti2.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrprotoboth.c b/clang/test/3C/generated_tests/arrprotoboth.c index 651ec7449f1d..888f692948e4 100644 --- a/clang/test/3C/generated_tests/arrprotoboth.c +++ b/clang/test/3C/generated_tests/arrprotoboth.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrprotocallee.c b/clang/test/3C/generated_tests/arrprotocallee.c index 2f80b0d30a41..daab972232dc 100644 --- a/clang/test/3C/generated_tests/arrprotocallee.c +++ b/clang/test/3C/generated_tests/arrprotocallee.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrprotocaller.c b/clang/test/3C/generated_tests/arrprotocaller.c index 92a655960ce0..1bb5da125dca 100644 --- a/clang/test/3C/generated_tests/arrprotocaller.c +++ b/clang/test/3C/generated_tests/arrprotocaller.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrprotosafe.c b/clang/test/3C/generated_tests/arrprotosafe.c index 8e0323df2246..f23f81b52e6b 100644 --- a/clang/test/3C/generated_tests/arrprotosafe.c +++ b/clang/test/3C/generated_tests/arrprotosafe.c @@ -20,20 +20,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrsafe.c b/clang/test/3C/generated_tests/arrsafe.c index cce4e38a5360..6f32b13da155 100644 --- a/clang/test/3C/generated_tests/arrsafe.c +++ b/clang/test/3C/generated_tests/arrsafe.c @@ -16,20 +16,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrsafemulti1.c b/clang/test/3C/generated_tests/arrsafemulti1.c index bdca41b23ffc..13d0c79006bd 100644 --- a/clang/test/3C/generated_tests/arrsafemulti1.c +++ b/clang/test/3C/generated_tests/arrsafemulti1.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrsafemulti2.c b/clang/test/3C/generated_tests/arrsafemulti2.c index a3ade8a01f53..ad9b1fbcff7c 100644 --- a/clang/test/3C/generated_tests/arrsafemulti2.c +++ b/clang/test/3C/generated_tests/arrsafemulti2.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrstructboth.c b/clang/test/3C/generated_tests/arrstructboth.c index 1007f4a8d4d5..8f8d5712f83e 100644 --- a/clang/test/3C/generated_tests/arrstructboth.c +++ b/clang/test/3C/generated_tests/arrstructboth.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrstructbothmulti1.c b/clang/test/3C/generated_tests/arrstructbothmulti1.c index c6f9657a460d..8436ce56e6e3 100644 --- a/clang/test/3C/generated_tests/arrstructbothmulti1.c +++ b/clang/test/3C/generated_tests/arrstructbothmulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrstructbothmulti2.c b/clang/test/3C/generated_tests/arrstructbothmulti2.c index fad6e7619c41..c27f62b9041a 100644 --- a/clang/test/3C/generated_tests/arrstructbothmulti2.c +++ b/clang/test/3C/generated_tests/arrstructbothmulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrstructcallee.c b/clang/test/3C/generated_tests/arrstructcallee.c index 9b6e25620590..43dabba34c05 100644 --- a/clang/test/3C/generated_tests/arrstructcallee.c +++ b/clang/test/3C/generated_tests/arrstructcallee.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrstructcalleemulti1.c b/clang/test/3C/generated_tests/arrstructcalleemulti1.c index 8991823cadac..d0f88fe1a86f 100644 --- a/clang/test/3C/generated_tests/arrstructcalleemulti1.c +++ b/clang/test/3C/generated_tests/arrstructcalleemulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrstructcalleemulti2.c b/clang/test/3C/generated_tests/arrstructcalleemulti2.c index d7da569c2d5f..7bfa9f6024f3 100644 --- a/clang/test/3C/generated_tests/arrstructcalleemulti2.c +++ b/clang/test/3C/generated_tests/arrstructcalleemulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrstructcaller.c b/clang/test/3C/generated_tests/arrstructcaller.c index 55b057604db9..d96b34a027ac 100644 --- a/clang/test/3C/generated_tests/arrstructcaller.c +++ b/clang/test/3C/generated_tests/arrstructcaller.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrstructcallermulti1.c b/clang/test/3C/generated_tests/arrstructcallermulti1.c index 131894654eee..d02c6bee0552 100644 --- a/clang/test/3C/generated_tests/arrstructcallermulti1.c +++ b/clang/test/3C/generated_tests/arrstructcallermulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrstructcallermulti2.c b/clang/test/3C/generated_tests/arrstructcallermulti2.c index 69aabc616cee..5454cd6e89ba 100644 --- a/clang/test/3C/generated_tests/arrstructcallermulti2.c +++ b/clang/test/3C/generated_tests/arrstructcallermulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrstructprotoboth.c b/clang/test/3C/generated_tests/arrstructprotoboth.c index 423e027ed99e..eddbf7d23bd3 100644 --- a/clang/test/3C/generated_tests/arrstructprotoboth.c +++ b/clang/test/3C/generated_tests/arrstructprotoboth.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrstructprotocallee.c b/clang/test/3C/generated_tests/arrstructprotocallee.c index 9b191ab7895e..a125dfe5c41c 100644 --- a/clang/test/3C/generated_tests/arrstructprotocallee.c +++ b/clang/test/3C/generated_tests/arrstructprotocallee.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrstructprotocaller.c b/clang/test/3C/generated_tests/arrstructprotocaller.c index b724fd0d2635..2666e0d85459 100644 --- a/clang/test/3C/generated_tests/arrstructprotocaller.c +++ b/clang/test/3C/generated_tests/arrstructprotocaller.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrstructprotosafe.c b/clang/test/3C/generated_tests/arrstructprotosafe.c index 6a1a5805c9d3..c9419e431bd4 100644 --- a/clang/test/3C/generated_tests/arrstructprotosafe.c +++ b/clang/test/3C/generated_tests/arrstructprotosafe.c @@ -20,20 +20,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrstructsafe.c b/clang/test/3C/generated_tests/arrstructsafe.c index 5fc431059190..009e09f57a69 100644 --- a/clang/test/3C/generated_tests/arrstructsafe.c +++ b/clang/test/3C/generated_tests/arrstructsafe.c @@ -16,20 +16,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrstructsafemulti1.c b/clang/test/3C/generated_tests/arrstructsafemulti1.c index 3e84969d92de..34e48491a944 100644 --- a/clang/test/3C/generated_tests/arrstructsafemulti1.c +++ b/clang/test/3C/generated_tests/arrstructsafemulti1.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/arrstructsafemulti2.c b/clang/test/3C/generated_tests/arrstructsafemulti2.c index 2568f0c8d370..08106e451d86 100644 --- a/clang/test/3C/generated_tests/arrstructsafemulti2.c +++ b/clang/test/3C/generated_tests/arrstructsafemulti2.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrboth.c b/clang/test/3C/generated_tests/fptrarrboth.c index 8bde23b22808..1ac9298c64f4 100644 --- a/clang/test/3C/generated_tests/fptrarrboth.c +++ b/clang/test/3C/generated_tests/fptrarrboth.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrbothmulti1.c b/clang/test/3C/generated_tests/fptrarrbothmulti1.c index 3c3872d344e5..15670fe60821 100644 --- a/clang/test/3C/generated_tests/fptrarrbothmulti1.c +++ b/clang/test/3C/generated_tests/fptrarrbothmulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrbothmulti2.c b/clang/test/3C/generated_tests/fptrarrbothmulti2.c index 81f8d5713f76..b13a262ce83b 100644 --- a/clang/test/3C/generated_tests/fptrarrbothmulti2.c +++ b/clang/test/3C/generated_tests/fptrarrbothmulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrcallee.c b/clang/test/3C/generated_tests/fptrarrcallee.c index 12fa9f21d579..5e5af7a46d3d 100644 --- a/clang/test/3C/generated_tests/fptrarrcallee.c +++ b/clang/test/3C/generated_tests/fptrarrcallee.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrcalleemulti1.c b/clang/test/3C/generated_tests/fptrarrcalleemulti1.c index 567f3d5ebe99..eeac61bf9fcc 100644 --- a/clang/test/3C/generated_tests/fptrarrcalleemulti1.c +++ b/clang/test/3C/generated_tests/fptrarrcalleemulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrcalleemulti2.c b/clang/test/3C/generated_tests/fptrarrcalleemulti2.c index c21f9b3953ab..f32d91f2c797 100644 --- a/clang/test/3C/generated_tests/fptrarrcalleemulti2.c +++ b/clang/test/3C/generated_tests/fptrarrcalleemulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrcaller.c b/clang/test/3C/generated_tests/fptrarrcaller.c index fe1ce5451298..a37ff7c719f2 100644 --- a/clang/test/3C/generated_tests/fptrarrcaller.c +++ b/clang/test/3C/generated_tests/fptrarrcaller.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrcallermulti1.c b/clang/test/3C/generated_tests/fptrarrcallermulti1.c index 4dfccb09a8c8..9d76f7ba09bf 100644 --- a/clang/test/3C/generated_tests/fptrarrcallermulti1.c +++ b/clang/test/3C/generated_tests/fptrarrcallermulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrcallermulti2.c b/clang/test/3C/generated_tests/fptrarrcallermulti2.c index 2646824087fb..6c81b570fb5f 100644 --- a/clang/test/3C/generated_tests/fptrarrcallermulti2.c +++ b/clang/test/3C/generated_tests/fptrarrcallermulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrinstructboth.c b/clang/test/3C/generated_tests/fptrarrinstructboth.c index 1e0e65c366dc..88835db70a12 100644 --- a/clang/test/3C/generated_tests/fptrarrinstructboth.c +++ b/clang/test/3C/generated_tests/fptrarrinstructboth.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrinstructbothmulti1.c b/clang/test/3C/generated_tests/fptrarrinstructbothmulti1.c index e1521b8fc90a..d7a7f7e245f7 100644 --- a/clang/test/3C/generated_tests/fptrarrinstructbothmulti1.c +++ b/clang/test/3C/generated_tests/fptrarrinstructbothmulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrinstructbothmulti2.c b/clang/test/3C/generated_tests/fptrarrinstructbothmulti2.c index efe701df9b53..afc603d42d1b 100644 --- a/clang/test/3C/generated_tests/fptrarrinstructbothmulti2.c +++ b/clang/test/3C/generated_tests/fptrarrinstructbothmulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrinstructcallee.c b/clang/test/3C/generated_tests/fptrarrinstructcallee.c index 6818c168bb0b..3a57ba18151c 100644 --- a/clang/test/3C/generated_tests/fptrarrinstructcallee.c +++ b/clang/test/3C/generated_tests/fptrarrinstructcallee.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrinstructcalleemulti1.c b/clang/test/3C/generated_tests/fptrarrinstructcalleemulti1.c index 82f7ccc73127..2e835a9bb9bd 100644 --- a/clang/test/3C/generated_tests/fptrarrinstructcalleemulti1.c +++ b/clang/test/3C/generated_tests/fptrarrinstructcalleemulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrinstructcalleemulti2.c b/clang/test/3C/generated_tests/fptrarrinstructcalleemulti2.c index 7ceb706ea997..4b0eb866e90e 100644 --- a/clang/test/3C/generated_tests/fptrarrinstructcalleemulti2.c +++ b/clang/test/3C/generated_tests/fptrarrinstructcalleemulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrinstructcaller.c b/clang/test/3C/generated_tests/fptrarrinstructcaller.c index 695b8ce61fd5..7cc8580df72e 100644 --- a/clang/test/3C/generated_tests/fptrarrinstructcaller.c +++ b/clang/test/3C/generated_tests/fptrarrinstructcaller.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrinstructcallermulti1.c b/clang/test/3C/generated_tests/fptrarrinstructcallermulti1.c index 51a4e6da34a0..b1f8eafb6dee 100644 --- a/clang/test/3C/generated_tests/fptrarrinstructcallermulti1.c +++ b/clang/test/3C/generated_tests/fptrarrinstructcallermulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrinstructcallermulti2.c b/clang/test/3C/generated_tests/fptrarrinstructcallermulti2.c index c6fc9b8e1b4a..abf4e3518f2c 100644 --- a/clang/test/3C/generated_tests/fptrarrinstructcallermulti2.c +++ b/clang/test/3C/generated_tests/fptrarrinstructcallermulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrinstructprotoboth.c b/clang/test/3C/generated_tests/fptrarrinstructprotoboth.c index f2566073c8c1..ce14fd2ffc97 100644 --- a/clang/test/3C/generated_tests/fptrarrinstructprotoboth.c +++ b/clang/test/3C/generated_tests/fptrarrinstructprotoboth.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrinstructprotocallee.c b/clang/test/3C/generated_tests/fptrarrinstructprotocallee.c index 64372a10404a..0b6f8ea7b7f8 100644 --- a/clang/test/3C/generated_tests/fptrarrinstructprotocallee.c +++ b/clang/test/3C/generated_tests/fptrarrinstructprotocallee.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrinstructprotocaller.c b/clang/test/3C/generated_tests/fptrarrinstructprotocaller.c index ad899197e433..e6c019d50b38 100644 --- a/clang/test/3C/generated_tests/fptrarrinstructprotocaller.c +++ b/clang/test/3C/generated_tests/fptrarrinstructprotocaller.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrinstructprotosafe.c b/clang/test/3C/generated_tests/fptrarrinstructprotosafe.c index 5100f664afdf..6ab2554ad32f 100644 --- a/clang/test/3C/generated_tests/fptrarrinstructprotosafe.c +++ b/clang/test/3C/generated_tests/fptrarrinstructprotosafe.c @@ -20,20 +20,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrinstructsafe.c b/clang/test/3C/generated_tests/fptrarrinstructsafe.c index 008830e864ed..e261cdc193aa 100644 --- a/clang/test/3C/generated_tests/fptrarrinstructsafe.c +++ b/clang/test/3C/generated_tests/fptrarrinstructsafe.c @@ -16,20 +16,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrinstructsafemulti1.c b/clang/test/3C/generated_tests/fptrarrinstructsafemulti1.c index d266937a469d..170d30fee9ca 100644 --- a/clang/test/3C/generated_tests/fptrarrinstructsafemulti1.c +++ b/clang/test/3C/generated_tests/fptrarrinstructsafemulti1.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrinstructsafemulti2.c b/clang/test/3C/generated_tests/fptrarrinstructsafemulti2.c index 1211cc713743..0f8dafd74b2a 100644 --- a/clang/test/3C/generated_tests/fptrarrinstructsafemulti2.c +++ b/clang/test/3C/generated_tests/fptrarrinstructsafemulti2.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrprotoboth.c b/clang/test/3C/generated_tests/fptrarrprotoboth.c index ceb7232139f2..bcf48a6a9e91 100644 --- a/clang/test/3C/generated_tests/fptrarrprotoboth.c +++ b/clang/test/3C/generated_tests/fptrarrprotoboth.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrprotocallee.c b/clang/test/3C/generated_tests/fptrarrprotocallee.c index b63fb20d3b90..4de828f3dc14 100644 --- a/clang/test/3C/generated_tests/fptrarrprotocallee.c +++ b/clang/test/3C/generated_tests/fptrarrprotocallee.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrprotocaller.c b/clang/test/3C/generated_tests/fptrarrprotocaller.c index aa259217c81d..a6e7705c974d 100644 --- a/clang/test/3C/generated_tests/fptrarrprotocaller.c +++ b/clang/test/3C/generated_tests/fptrarrprotocaller.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrprotosafe.c b/clang/test/3C/generated_tests/fptrarrprotosafe.c index 00a8b06e7eda..b021c930c428 100644 --- a/clang/test/3C/generated_tests/fptrarrprotosafe.c +++ b/clang/test/3C/generated_tests/fptrarrprotosafe.c @@ -20,20 +20,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrsafe.c b/clang/test/3C/generated_tests/fptrarrsafe.c index 50224c872e1d..547b67fb526f 100644 --- a/clang/test/3C/generated_tests/fptrarrsafe.c +++ b/clang/test/3C/generated_tests/fptrarrsafe.c @@ -16,20 +16,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrsafemulti1.c b/clang/test/3C/generated_tests/fptrarrsafemulti1.c index 79a84d17e195..967b4a3639e0 100644 --- a/clang/test/3C/generated_tests/fptrarrsafemulti1.c +++ b/clang/test/3C/generated_tests/fptrarrsafemulti1.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrsafemulti2.c b/clang/test/3C/generated_tests/fptrarrsafemulti2.c index 9fb2927c5003..069d0bcc3b85 100644 --- a/clang/test/3C/generated_tests/fptrarrsafemulti2.c +++ b/clang/test/3C/generated_tests/fptrarrsafemulti2.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrstructboth.c b/clang/test/3C/generated_tests/fptrarrstructboth.c index 4ff20c83393b..e89803577851 100644 --- a/clang/test/3C/generated_tests/fptrarrstructboth.c +++ b/clang/test/3C/generated_tests/fptrarrstructboth.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrstructbothmulti1.c b/clang/test/3C/generated_tests/fptrarrstructbothmulti1.c index fcbc8a28c64b..d78de49c954e 100644 --- a/clang/test/3C/generated_tests/fptrarrstructbothmulti1.c +++ b/clang/test/3C/generated_tests/fptrarrstructbothmulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrstructbothmulti2.c b/clang/test/3C/generated_tests/fptrarrstructbothmulti2.c index 792dd5659914..3822174a8c9a 100644 --- a/clang/test/3C/generated_tests/fptrarrstructbothmulti2.c +++ b/clang/test/3C/generated_tests/fptrarrstructbothmulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrstructcallee.c b/clang/test/3C/generated_tests/fptrarrstructcallee.c index 4e3d3329b6b0..4bcf306d8a6b 100644 --- a/clang/test/3C/generated_tests/fptrarrstructcallee.c +++ b/clang/test/3C/generated_tests/fptrarrstructcallee.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrstructcalleemulti1.c b/clang/test/3C/generated_tests/fptrarrstructcalleemulti1.c index 396fb5ee75f0..c2cf2111befc 100644 --- a/clang/test/3C/generated_tests/fptrarrstructcalleemulti1.c +++ b/clang/test/3C/generated_tests/fptrarrstructcalleemulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrstructcalleemulti2.c b/clang/test/3C/generated_tests/fptrarrstructcalleemulti2.c index d3f7c108bffd..eee481b020c4 100644 --- a/clang/test/3C/generated_tests/fptrarrstructcalleemulti2.c +++ b/clang/test/3C/generated_tests/fptrarrstructcalleemulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrstructcaller.c b/clang/test/3C/generated_tests/fptrarrstructcaller.c index 0eed7336f3a1..1ff2192425b2 100644 --- a/clang/test/3C/generated_tests/fptrarrstructcaller.c +++ b/clang/test/3C/generated_tests/fptrarrstructcaller.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrstructcallermulti1.c b/clang/test/3C/generated_tests/fptrarrstructcallermulti1.c index 64ceadc086ea..4a4171e19471 100644 --- a/clang/test/3C/generated_tests/fptrarrstructcallermulti1.c +++ b/clang/test/3C/generated_tests/fptrarrstructcallermulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrstructcallermulti2.c b/clang/test/3C/generated_tests/fptrarrstructcallermulti2.c index 16d10e303624..e8822e807981 100644 --- a/clang/test/3C/generated_tests/fptrarrstructcallermulti2.c +++ b/clang/test/3C/generated_tests/fptrarrstructcallermulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrstructprotoboth.c b/clang/test/3C/generated_tests/fptrarrstructprotoboth.c index 7e662a3e5876..7ce72daeda4a 100644 --- a/clang/test/3C/generated_tests/fptrarrstructprotoboth.c +++ b/clang/test/3C/generated_tests/fptrarrstructprotoboth.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrstructprotocallee.c b/clang/test/3C/generated_tests/fptrarrstructprotocallee.c index ebb1420827ec..6649d43d1d7d 100644 --- a/clang/test/3C/generated_tests/fptrarrstructprotocallee.c +++ b/clang/test/3C/generated_tests/fptrarrstructprotocallee.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrstructprotocaller.c b/clang/test/3C/generated_tests/fptrarrstructprotocaller.c index 317dd71cc895..9dafad352426 100644 --- a/clang/test/3C/generated_tests/fptrarrstructprotocaller.c +++ b/clang/test/3C/generated_tests/fptrarrstructprotocaller.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrstructprotosafe.c b/clang/test/3C/generated_tests/fptrarrstructprotosafe.c index de59d186bc88..62b7a2985d9b 100644 --- a/clang/test/3C/generated_tests/fptrarrstructprotosafe.c +++ b/clang/test/3C/generated_tests/fptrarrstructprotosafe.c @@ -20,20 +20,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrstructsafe.c b/clang/test/3C/generated_tests/fptrarrstructsafe.c index 353bdb4314aa..b3f9883be1cb 100644 --- a/clang/test/3C/generated_tests/fptrarrstructsafe.c +++ b/clang/test/3C/generated_tests/fptrarrstructsafe.c @@ -16,20 +16,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrstructsafemulti1.c b/clang/test/3C/generated_tests/fptrarrstructsafemulti1.c index c6b72f34f58a..7dc366e08433 100644 --- a/clang/test/3C/generated_tests/fptrarrstructsafemulti1.c +++ b/clang/test/3C/generated_tests/fptrarrstructsafemulti1.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrarrstructsafemulti2.c b/clang/test/3C/generated_tests/fptrarrstructsafemulti2.c index 8db80d082227..c9f7990697ce 100644 --- a/clang/test/3C/generated_tests/fptrarrstructsafemulti2.c +++ b/clang/test/3C/generated_tests/fptrarrstructsafemulti2.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrinstructboth.c b/clang/test/3C/generated_tests/fptrinstructboth.c index 76b8af4f240e..a3a1837b101b 100644 --- a/clang/test/3C/generated_tests/fptrinstructboth.c +++ b/clang/test/3C/generated_tests/fptrinstructboth.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrinstructbothmulti1.c b/clang/test/3C/generated_tests/fptrinstructbothmulti1.c index eb00026c2ee8..b1cbfff63aa4 100644 --- a/clang/test/3C/generated_tests/fptrinstructbothmulti1.c +++ b/clang/test/3C/generated_tests/fptrinstructbothmulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrinstructbothmulti2.c b/clang/test/3C/generated_tests/fptrinstructbothmulti2.c index 88ead34d5e22..50b449146a2d 100644 --- a/clang/test/3C/generated_tests/fptrinstructbothmulti2.c +++ b/clang/test/3C/generated_tests/fptrinstructbothmulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrinstructcallee.c b/clang/test/3C/generated_tests/fptrinstructcallee.c index 839792c14b01..2723e4491d4a 100644 --- a/clang/test/3C/generated_tests/fptrinstructcallee.c +++ b/clang/test/3C/generated_tests/fptrinstructcallee.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrinstructcalleemulti1.c b/clang/test/3C/generated_tests/fptrinstructcalleemulti1.c index 929b787e938e..a21dd8f74134 100644 --- a/clang/test/3C/generated_tests/fptrinstructcalleemulti1.c +++ b/clang/test/3C/generated_tests/fptrinstructcalleemulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrinstructcalleemulti2.c b/clang/test/3C/generated_tests/fptrinstructcalleemulti2.c index d8a312b07dab..fb7e15273028 100644 --- a/clang/test/3C/generated_tests/fptrinstructcalleemulti2.c +++ b/clang/test/3C/generated_tests/fptrinstructcalleemulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrinstructcaller.c b/clang/test/3C/generated_tests/fptrinstructcaller.c index 3ad3eecf8075..4b11dd2d2b0a 100644 --- a/clang/test/3C/generated_tests/fptrinstructcaller.c +++ b/clang/test/3C/generated_tests/fptrinstructcaller.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrinstructcallermulti1.c b/clang/test/3C/generated_tests/fptrinstructcallermulti1.c index a30679cf78fe..cab0752daade 100644 --- a/clang/test/3C/generated_tests/fptrinstructcallermulti1.c +++ b/clang/test/3C/generated_tests/fptrinstructcallermulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrinstructcallermulti2.c b/clang/test/3C/generated_tests/fptrinstructcallermulti2.c index e808092676ce..f0aad8aaf4d3 100644 --- a/clang/test/3C/generated_tests/fptrinstructcallermulti2.c +++ b/clang/test/3C/generated_tests/fptrinstructcallermulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrinstructprotoboth.c b/clang/test/3C/generated_tests/fptrinstructprotoboth.c index eb7261972aab..e4f43dad00f2 100644 --- a/clang/test/3C/generated_tests/fptrinstructprotoboth.c +++ b/clang/test/3C/generated_tests/fptrinstructprotoboth.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrinstructprotocallee.c b/clang/test/3C/generated_tests/fptrinstructprotocallee.c index f98d03ab558c..1b6ef177a33d 100644 --- a/clang/test/3C/generated_tests/fptrinstructprotocallee.c +++ b/clang/test/3C/generated_tests/fptrinstructprotocallee.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrinstructprotocaller.c b/clang/test/3C/generated_tests/fptrinstructprotocaller.c index 6fa7fef96357..f7d25b24af44 100644 --- a/clang/test/3C/generated_tests/fptrinstructprotocaller.c +++ b/clang/test/3C/generated_tests/fptrinstructprotocaller.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrinstructprotosafe.c b/clang/test/3C/generated_tests/fptrinstructprotosafe.c index 2c0bfac240b9..5a305c0a7c7a 100644 --- a/clang/test/3C/generated_tests/fptrinstructprotosafe.c +++ b/clang/test/3C/generated_tests/fptrinstructprotosafe.c @@ -20,20 +20,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrinstructsafe.c b/clang/test/3C/generated_tests/fptrinstructsafe.c index db29ced2b489..a7cdeea538c6 100644 --- a/clang/test/3C/generated_tests/fptrinstructsafe.c +++ b/clang/test/3C/generated_tests/fptrinstructsafe.c @@ -16,20 +16,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrinstructsafemulti1.c b/clang/test/3C/generated_tests/fptrinstructsafemulti1.c index 0effbcb3cba8..659cc91c3d8f 100644 --- a/clang/test/3C/generated_tests/fptrinstructsafemulti1.c +++ b/clang/test/3C/generated_tests/fptrinstructsafemulti1.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrinstructsafemulti2.c b/clang/test/3C/generated_tests/fptrinstructsafemulti2.c index 753a9336e864..91d9276b7202 100644 --- a/clang/test/3C/generated_tests/fptrinstructsafemulti2.c +++ b/clang/test/3C/generated_tests/fptrinstructsafemulti2.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrsafeboth.c b/clang/test/3C/generated_tests/fptrsafeboth.c index f852140a1975..596d093e3235 100644 --- a/clang/test/3C/generated_tests/fptrsafeboth.c +++ b/clang/test/3C/generated_tests/fptrsafeboth.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrsafebothmulti1.c b/clang/test/3C/generated_tests/fptrsafebothmulti1.c index b16689e61f8a..4b8bd878d83a 100644 --- a/clang/test/3C/generated_tests/fptrsafebothmulti1.c +++ b/clang/test/3C/generated_tests/fptrsafebothmulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrsafebothmulti2.c b/clang/test/3C/generated_tests/fptrsafebothmulti2.c index a62bbabe6363..7b975cee340a 100644 --- a/clang/test/3C/generated_tests/fptrsafebothmulti2.c +++ b/clang/test/3C/generated_tests/fptrsafebothmulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrsafecallee.c b/clang/test/3C/generated_tests/fptrsafecallee.c index b1cb6b2a0111..fc21ef661933 100644 --- a/clang/test/3C/generated_tests/fptrsafecallee.c +++ b/clang/test/3C/generated_tests/fptrsafecallee.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrsafecalleemulti1.c b/clang/test/3C/generated_tests/fptrsafecalleemulti1.c index c6201a0dd3d8..86cbb58f5552 100644 --- a/clang/test/3C/generated_tests/fptrsafecalleemulti1.c +++ b/clang/test/3C/generated_tests/fptrsafecalleemulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrsafecalleemulti2.c b/clang/test/3C/generated_tests/fptrsafecalleemulti2.c index c615c1da6771..92a0d3a82aa2 100644 --- a/clang/test/3C/generated_tests/fptrsafecalleemulti2.c +++ b/clang/test/3C/generated_tests/fptrsafecalleemulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrsafecaller.c b/clang/test/3C/generated_tests/fptrsafecaller.c index 5e82d77fb6f4..5365917e0153 100644 --- a/clang/test/3C/generated_tests/fptrsafecaller.c +++ b/clang/test/3C/generated_tests/fptrsafecaller.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrsafecallermulti1.c b/clang/test/3C/generated_tests/fptrsafecallermulti1.c index 8045f3f8906d..f0af21921731 100644 --- a/clang/test/3C/generated_tests/fptrsafecallermulti1.c +++ b/clang/test/3C/generated_tests/fptrsafecallermulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrsafecallermulti2.c b/clang/test/3C/generated_tests/fptrsafecallermulti2.c index 6b84b9dda33c..38bad4381536 100644 --- a/clang/test/3C/generated_tests/fptrsafecallermulti2.c +++ b/clang/test/3C/generated_tests/fptrsafecallermulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrsafeprotoboth.c b/clang/test/3C/generated_tests/fptrsafeprotoboth.c index 65718537c28d..9647410f6dcb 100644 --- a/clang/test/3C/generated_tests/fptrsafeprotoboth.c +++ b/clang/test/3C/generated_tests/fptrsafeprotoboth.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrsafeprotocallee.c b/clang/test/3C/generated_tests/fptrsafeprotocallee.c index 23046b237cd8..80d1aa3d0ba2 100644 --- a/clang/test/3C/generated_tests/fptrsafeprotocallee.c +++ b/clang/test/3C/generated_tests/fptrsafeprotocallee.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrsafeprotocaller.c b/clang/test/3C/generated_tests/fptrsafeprotocaller.c index e7aa59281be2..b1954862b1d7 100644 --- a/clang/test/3C/generated_tests/fptrsafeprotocaller.c +++ b/clang/test/3C/generated_tests/fptrsafeprotocaller.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrsafeprotosafe.c b/clang/test/3C/generated_tests/fptrsafeprotosafe.c index 740074893913..976563104c6f 100644 --- a/clang/test/3C/generated_tests/fptrsafeprotosafe.c +++ b/clang/test/3C/generated_tests/fptrsafeprotosafe.c @@ -20,20 +20,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrsafesafe.c b/clang/test/3C/generated_tests/fptrsafesafe.c index 2ae9e9a1b381..fe411f35ad73 100644 --- a/clang/test/3C/generated_tests/fptrsafesafe.c +++ b/clang/test/3C/generated_tests/fptrsafesafe.c @@ -16,20 +16,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrsafesafemulti1.c b/clang/test/3C/generated_tests/fptrsafesafemulti1.c index 3342a820900a..73d4b5bb2e24 100644 --- a/clang/test/3C/generated_tests/fptrsafesafemulti1.c +++ b/clang/test/3C/generated_tests/fptrsafesafemulti1.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrsafesafemulti2.c b/clang/test/3C/generated_tests/fptrsafesafemulti2.c index a69433146eff..a806b804c9f5 100644 --- a/clang/test/3C/generated_tests/fptrsafesafemulti2.c +++ b/clang/test/3C/generated_tests/fptrsafesafemulti2.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrunsafeboth.c b/clang/test/3C/generated_tests/fptrunsafeboth.c index 1a16446d34cd..e2e7e3ed94eb 100644 --- a/clang/test/3C/generated_tests/fptrunsafeboth.c +++ b/clang/test/3C/generated_tests/fptrunsafeboth.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrunsafebothmulti1.c b/clang/test/3C/generated_tests/fptrunsafebothmulti1.c index d72f0c26b701..4e728215385c 100644 --- a/clang/test/3C/generated_tests/fptrunsafebothmulti1.c +++ b/clang/test/3C/generated_tests/fptrunsafebothmulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrunsafebothmulti2.c b/clang/test/3C/generated_tests/fptrunsafebothmulti2.c index 159e76aa2662..8b2d833c65b9 100644 --- a/clang/test/3C/generated_tests/fptrunsafebothmulti2.c +++ b/clang/test/3C/generated_tests/fptrunsafebothmulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrunsafecallee.c b/clang/test/3C/generated_tests/fptrunsafecallee.c index 54046cd4fd85..c4b830eb3aae 100644 --- a/clang/test/3C/generated_tests/fptrunsafecallee.c +++ b/clang/test/3C/generated_tests/fptrunsafecallee.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrunsafecalleemulti1.c b/clang/test/3C/generated_tests/fptrunsafecalleemulti1.c index 676d5594a458..3eba42e13e62 100644 --- a/clang/test/3C/generated_tests/fptrunsafecalleemulti1.c +++ b/clang/test/3C/generated_tests/fptrunsafecalleemulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrunsafecalleemulti2.c b/clang/test/3C/generated_tests/fptrunsafecalleemulti2.c index 9cc895b3f640..b5ace0f81a6f 100644 --- a/clang/test/3C/generated_tests/fptrunsafecalleemulti2.c +++ b/clang/test/3C/generated_tests/fptrunsafecalleemulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrunsafecaller.c b/clang/test/3C/generated_tests/fptrunsafecaller.c index 747e7924faba..52eab36eff46 100644 --- a/clang/test/3C/generated_tests/fptrunsafecaller.c +++ b/clang/test/3C/generated_tests/fptrunsafecaller.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrunsafecallermulti1.c b/clang/test/3C/generated_tests/fptrunsafecallermulti1.c index cf9fd5e54c30..856dc7c8208c 100644 --- a/clang/test/3C/generated_tests/fptrunsafecallermulti1.c +++ b/clang/test/3C/generated_tests/fptrunsafecallermulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrunsafecallermulti2.c b/clang/test/3C/generated_tests/fptrunsafecallermulti2.c index adc80ebdfd57..fe75d46bb5a9 100644 --- a/clang/test/3C/generated_tests/fptrunsafecallermulti2.c +++ b/clang/test/3C/generated_tests/fptrunsafecallermulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrunsafeprotoboth.c b/clang/test/3C/generated_tests/fptrunsafeprotoboth.c index 851d5bcb2dbe..cc286c95aacd 100644 --- a/clang/test/3C/generated_tests/fptrunsafeprotoboth.c +++ b/clang/test/3C/generated_tests/fptrunsafeprotoboth.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrunsafeprotocallee.c b/clang/test/3C/generated_tests/fptrunsafeprotocallee.c index 6f4c55031a81..adbee40ac9d4 100644 --- a/clang/test/3C/generated_tests/fptrunsafeprotocallee.c +++ b/clang/test/3C/generated_tests/fptrunsafeprotocallee.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrunsafeprotocaller.c b/clang/test/3C/generated_tests/fptrunsafeprotocaller.c index d096a1407cde..b3f73a68acdf 100644 --- a/clang/test/3C/generated_tests/fptrunsafeprotocaller.c +++ b/clang/test/3C/generated_tests/fptrunsafeprotocaller.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrunsafeprotosafe.c b/clang/test/3C/generated_tests/fptrunsafeprotosafe.c index a0b83980cafc..c521be1bf8dd 100644 --- a/clang/test/3C/generated_tests/fptrunsafeprotosafe.c +++ b/clang/test/3C/generated_tests/fptrunsafeprotosafe.c @@ -20,20 +20,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrunsafesafe.c b/clang/test/3C/generated_tests/fptrunsafesafe.c index 378579e5b4ae..c0eaf0871dce 100644 --- a/clang/test/3C/generated_tests/fptrunsafesafe.c +++ b/clang/test/3C/generated_tests/fptrunsafesafe.c @@ -16,20 +16,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrunsafesafemulti1.c b/clang/test/3C/generated_tests/fptrunsafesafemulti1.c index 210157a318b9..63e9afc643a9 100644 --- a/clang/test/3C/generated_tests/fptrunsafesafemulti1.c +++ b/clang/test/3C/generated_tests/fptrunsafesafemulti1.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/fptrunsafesafemulti2.c b/clang/test/3C/generated_tests/fptrunsafesafemulti2.c index d76b63cde9da..d5f67db7dc60 100644 --- a/clang/test/3C/generated_tests/fptrunsafesafemulti2.c +++ b/clang/test/3C/generated_tests/fptrunsafesafemulti2.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/ptrTOptrboth.c b/clang/test/3C/generated_tests/ptrTOptrboth.c index 53bb0a4794d3..07745dc4f7c5 100644 --- a/clang/test/3C/generated_tests/ptrTOptrboth.c +++ b/clang/test/3C/generated_tests/ptrTOptrboth.c @@ -16,20 +16,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/ptrTOptrbothmulti1.c b/clang/test/3C/generated_tests/ptrTOptrbothmulti1.c index c9aceb915773..1ca8094fbde2 100644 --- a/clang/test/3C/generated_tests/ptrTOptrbothmulti1.c +++ b/clang/test/3C/generated_tests/ptrTOptrbothmulti1.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/ptrTOptrbothmulti2.c b/clang/test/3C/generated_tests/ptrTOptrbothmulti2.c index 1c755689fbc0..d80ec2650645 100644 --- a/clang/test/3C/generated_tests/ptrTOptrbothmulti2.c +++ b/clang/test/3C/generated_tests/ptrTOptrbothmulti2.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/ptrTOptrcallee.c b/clang/test/3C/generated_tests/ptrTOptrcallee.c index 2b0932b2ddff..ea8ca5db3ead 100644 --- a/clang/test/3C/generated_tests/ptrTOptrcallee.c +++ b/clang/test/3C/generated_tests/ptrTOptrcallee.c @@ -16,20 +16,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/ptrTOptrcalleemulti1.c b/clang/test/3C/generated_tests/ptrTOptrcalleemulti1.c index e4d45cb0a350..3bfc99068cb5 100644 --- a/clang/test/3C/generated_tests/ptrTOptrcalleemulti1.c +++ b/clang/test/3C/generated_tests/ptrTOptrcalleemulti1.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/ptrTOptrcalleemulti2.c b/clang/test/3C/generated_tests/ptrTOptrcalleemulti2.c index 73ecda93cbea..28bf64c42e7c 100644 --- a/clang/test/3C/generated_tests/ptrTOptrcalleemulti2.c +++ b/clang/test/3C/generated_tests/ptrTOptrcalleemulti2.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/ptrTOptrcaller.c b/clang/test/3C/generated_tests/ptrTOptrcaller.c index e7be983882c0..79d5d8aff072 100644 --- a/clang/test/3C/generated_tests/ptrTOptrcaller.c +++ b/clang/test/3C/generated_tests/ptrTOptrcaller.c @@ -16,20 +16,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/ptrTOptrcallermulti1.c b/clang/test/3C/generated_tests/ptrTOptrcallermulti1.c index 8b1920e26420..af71ef6e10c3 100644 --- a/clang/test/3C/generated_tests/ptrTOptrcallermulti1.c +++ b/clang/test/3C/generated_tests/ptrTOptrcallermulti1.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/ptrTOptrcallermulti2.c b/clang/test/3C/generated_tests/ptrTOptrcallermulti2.c index ad3fd0d7b987..b0b2686d43d1 100644 --- a/clang/test/3C/generated_tests/ptrTOptrcallermulti2.c +++ b/clang/test/3C/generated_tests/ptrTOptrcallermulti2.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/ptrTOptrprotoboth.c b/clang/test/3C/generated_tests/ptrTOptrprotoboth.c index 64da90268697..b4e8154d1a0e 100644 --- a/clang/test/3C/generated_tests/ptrTOptrprotoboth.c +++ b/clang/test/3C/generated_tests/ptrTOptrprotoboth.c @@ -20,20 +20,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/ptrTOptrprotocallee.c b/clang/test/3C/generated_tests/ptrTOptrprotocallee.c index 2439728001eb..df95dd98e94d 100644 --- a/clang/test/3C/generated_tests/ptrTOptrprotocallee.c +++ b/clang/test/3C/generated_tests/ptrTOptrprotocallee.c @@ -20,20 +20,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/ptrTOptrprotocaller.c b/clang/test/3C/generated_tests/ptrTOptrprotocaller.c index 6bb4ee18b649..50e87d22e809 100644 --- a/clang/test/3C/generated_tests/ptrTOptrprotocaller.c +++ b/clang/test/3C/generated_tests/ptrTOptrprotocaller.c @@ -20,20 +20,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/ptrTOptrprotosafe.c b/clang/test/3C/generated_tests/ptrTOptrprotosafe.c index 1db1d52a1e83..1cffeb6906a8 100644 --- a/clang/test/3C/generated_tests/ptrTOptrprotosafe.c +++ b/clang/test/3C/generated_tests/ptrTOptrprotosafe.c @@ -19,20 +19,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/ptrTOptrsafe.c b/clang/test/3C/generated_tests/ptrTOptrsafe.c index 8a452c21ed65..ebdac1ab3b6b 100644 --- a/clang/test/3C/generated_tests/ptrTOptrsafe.c +++ b/clang/test/3C/generated_tests/ptrTOptrsafe.c @@ -15,20 +15,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/ptrTOptrsafemulti1.c b/clang/test/3C/generated_tests/ptrTOptrsafemulti1.c index 87d94896205f..1ca635ea1f77 100644 --- a/clang/test/3C/generated_tests/ptrTOptrsafemulti1.c +++ b/clang/test/3C/generated_tests/ptrTOptrsafemulti1.c @@ -22,20 +22,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/ptrTOptrsafemulti2.c b/clang/test/3C/generated_tests/ptrTOptrsafemulti2.c index a1f794c43e62..d4aed00ea132 100644 --- a/clang/test/3C/generated_tests/ptrTOptrsafemulti2.c +++ b/clang/test/3C/generated_tests/ptrTOptrsafemulti2.c @@ -22,20 +22,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/safefptrargboth.c b/clang/test/3C/generated_tests/safefptrargboth.c index 6e82e5e2127d..72c66dc9bc32 100644 --- a/clang/test/3C/generated_tests/safefptrargboth.c +++ b/clang/test/3C/generated_tests/safefptrargboth.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/safefptrargbothmulti1.c b/clang/test/3C/generated_tests/safefptrargbothmulti1.c index 0fcb737b2dbc..bbcaee35b521 100644 --- a/clang/test/3C/generated_tests/safefptrargbothmulti1.c +++ b/clang/test/3C/generated_tests/safefptrargbothmulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/safefptrargbothmulti2.c b/clang/test/3C/generated_tests/safefptrargbothmulti2.c index 26ae8af27edf..a30ac29e18cd 100644 --- a/clang/test/3C/generated_tests/safefptrargbothmulti2.c +++ b/clang/test/3C/generated_tests/safefptrargbothmulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/safefptrargcallee.c b/clang/test/3C/generated_tests/safefptrargcallee.c index 28b402700e8c..5ccf4e178fc2 100644 --- a/clang/test/3C/generated_tests/safefptrargcallee.c +++ b/clang/test/3C/generated_tests/safefptrargcallee.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/safefptrargcalleemulti1.c b/clang/test/3C/generated_tests/safefptrargcalleemulti1.c index 3ae66c1810ac..ce77e82b56ff 100644 --- a/clang/test/3C/generated_tests/safefptrargcalleemulti1.c +++ b/clang/test/3C/generated_tests/safefptrargcalleemulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/safefptrargcalleemulti2.c b/clang/test/3C/generated_tests/safefptrargcalleemulti2.c index 0a0e5c7e42e6..9979e179453d 100644 --- a/clang/test/3C/generated_tests/safefptrargcalleemulti2.c +++ b/clang/test/3C/generated_tests/safefptrargcalleemulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/safefptrargcaller.c b/clang/test/3C/generated_tests/safefptrargcaller.c index a3625433e089..ecfe63a03b85 100644 --- a/clang/test/3C/generated_tests/safefptrargcaller.c +++ b/clang/test/3C/generated_tests/safefptrargcaller.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/safefptrargcallermulti1.c b/clang/test/3C/generated_tests/safefptrargcallermulti1.c index eff89252e69a..e88ef8be48e2 100644 --- a/clang/test/3C/generated_tests/safefptrargcallermulti1.c +++ b/clang/test/3C/generated_tests/safefptrargcallermulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/safefptrargcallermulti2.c b/clang/test/3C/generated_tests/safefptrargcallermulti2.c index 9dfbad26ddd2..83599296517b 100644 --- a/clang/test/3C/generated_tests/safefptrargcallermulti2.c +++ b/clang/test/3C/generated_tests/safefptrargcallermulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/safefptrargprotoboth.c b/clang/test/3C/generated_tests/safefptrargprotoboth.c index baef19880714..d1d24aba3ad5 100644 --- a/clang/test/3C/generated_tests/safefptrargprotoboth.c +++ b/clang/test/3C/generated_tests/safefptrargprotoboth.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/safefptrargprotocallee.c b/clang/test/3C/generated_tests/safefptrargprotocallee.c index c0d213f6b092..a94f78341f70 100644 --- a/clang/test/3C/generated_tests/safefptrargprotocallee.c +++ b/clang/test/3C/generated_tests/safefptrargprotocallee.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/safefptrargprotocaller.c b/clang/test/3C/generated_tests/safefptrargprotocaller.c index 44d80b232ab4..3eccfa4cd90e 100644 --- a/clang/test/3C/generated_tests/safefptrargprotocaller.c +++ b/clang/test/3C/generated_tests/safefptrargprotocaller.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/safefptrargprotosafe.c b/clang/test/3C/generated_tests/safefptrargprotosafe.c index 31581307c280..27622b2f41df 100644 --- a/clang/test/3C/generated_tests/safefptrargprotosafe.c +++ b/clang/test/3C/generated_tests/safefptrargprotosafe.c @@ -20,20 +20,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/safefptrargsafe.c b/clang/test/3C/generated_tests/safefptrargsafe.c index bd66b568763c..90f68f43770c 100644 --- a/clang/test/3C/generated_tests/safefptrargsafe.c +++ b/clang/test/3C/generated_tests/safefptrargsafe.c @@ -16,20 +16,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/safefptrargsafemulti1.c b/clang/test/3C/generated_tests/safefptrargsafemulti1.c index 035385772c98..934605103811 100644 --- a/clang/test/3C/generated_tests/safefptrargsafemulti1.c +++ b/clang/test/3C/generated_tests/safefptrargsafemulti1.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/safefptrargsafemulti2.c b/clang/test/3C/generated_tests/safefptrargsafemulti2.c index 5f8926029dea..492723da43b6 100644 --- a/clang/test/3C/generated_tests/safefptrargsafemulti2.c +++ b/clang/test/3C/generated_tests/safefptrargsafemulti2.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/unsafefptrargboth.c b/clang/test/3C/generated_tests/unsafefptrargboth.c index 57342939bc16..343f77a68665 100644 --- a/clang/test/3C/generated_tests/unsafefptrargboth.c +++ b/clang/test/3C/generated_tests/unsafefptrargboth.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/unsafefptrargbothmulti1.c b/clang/test/3C/generated_tests/unsafefptrargbothmulti1.c index bd3739742886..3ba8c4e2dcb2 100644 --- a/clang/test/3C/generated_tests/unsafefptrargbothmulti1.c +++ b/clang/test/3C/generated_tests/unsafefptrargbothmulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/unsafefptrargbothmulti2.c b/clang/test/3C/generated_tests/unsafefptrargbothmulti2.c index 518828d04444..ffa51de39865 100644 --- a/clang/test/3C/generated_tests/unsafefptrargbothmulti2.c +++ b/clang/test/3C/generated_tests/unsafefptrargbothmulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/unsafefptrargcallee.c b/clang/test/3C/generated_tests/unsafefptrargcallee.c index 7dd9e221dd65..47827790a250 100644 --- a/clang/test/3C/generated_tests/unsafefptrargcallee.c +++ b/clang/test/3C/generated_tests/unsafefptrargcallee.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/unsafefptrargcalleemulti1.c b/clang/test/3C/generated_tests/unsafefptrargcalleemulti1.c index 42880532a372..29990d3c3849 100644 --- a/clang/test/3C/generated_tests/unsafefptrargcalleemulti1.c +++ b/clang/test/3C/generated_tests/unsafefptrargcalleemulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/unsafefptrargcalleemulti2.c b/clang/test/3C/generated_tests/unsafefptrargcalleemulti2.c index 1454d996c132..b961998746b2 100644 --- a/clang/test/3C/generated_tests/unsafefptrargcalleemulti2.c +++ b/clang/test/3C/generated_tests/unsafefptrargcalleemulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/unsafefptrargcaller.c b/clang/test/3C/generated_tests/unsafefptrargcaller.c index e657fe01aed3..caf419924272 100644 --- a/clang/test/3C/generated_tests/unsafefptrargcaller.c +++ b/clang/test/3C/generated_tests/unsafefptrargcaller.c @@ -17,20 +17,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/unsafefptrargcallermulti1.c b/clang/test/3C/generated_tests/unsafefptrargcallermulti1.c index 12d95e326d46..fd46bfa4eb70 100644 --- a/clang/test/3C/generated_tests/unsafefptrargcallermulti1.c +++ b/clang/test/3C/generated_tests/unsafefptrargcallermulti1.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/unsafefptrargcallermulti2.c b/clang/test/3C/generated_tests/unsafefptrargcallermulti2.c index 70f731d5770e..28bf5da24b3a 100644 --- a/clang/test/3C/generated_tests/unsafefptrargcallermulti2.c +++ b/clang/test/3C/generated_tests/unsafefptrargcallermulti2.c @@ -24,20 +24,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/unsafefptrargprotoboth.c b/clang/test/3C/generated_tests/unsafefptrargprotoboth.c index a56155f92011..66187823b24b 100644 --- a/clang/test/3C/generated_tests/unsafefptrargprotoboth.c +++ b/clang/test/3C/generated_tests/unsafefptrargprotoboth.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/unsafefptrargprotocallee.c b/clang/test/3C/generated_tests/unsafefptrargprotocallee.c index 6af32a9d11a3..7a03290a6bdd 100644 --- a/clang/test/3C/generated_tests/unsafefptrargprotocallee.c +++ b/clang/test/3C/generated_tests/unsafefptrargprotocallee.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/unsafefptrargprotocaller.c b/clang/test/3C/generated_tests/unsafefptrargprotocaller.c index 196415a378d7..406a74202984 100644 --- a/clang/test/3C/generated_tests/unsafefptrargprotocaller.c +++ b/clang/test/3C/generated_tests/unsafefptrargprotocaller.c @@ -21,20 +21,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/unsafefptrargprotosafe.c b/clang/test/3C/generated_tests/unsafefptrargprotosafe.c index 3caaa22523d7..4d892e2c7d18 100644 --- a/clang/test/3C/generated_tests/unsafefptrargprotosafe.c +++ b/clang/test/3C/generated_tests/unsafefptrargprotosafe.c @@ -20,20 +20,9 @@ while the definition for sus appears below them*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/unsafefptrargsafe.c b/clang/test/3C/generated_tests/unsafefptrargsafe.c index 448bf6cba41c..ad7ef51b9a42 100644 --- a/clang/test/3C/generated_tests/unsafefptrargsafe.c +++ b/clang/test/3C/generated_tests/unsafefptrargsafe.c @@ -16,20 +16,9 @@ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/unsafefptrargsafemulti1.c b/clang/test/3C/generated_tests/unsafefptrargsafemulti1.c index ccd32aba11af..da3f7c97c732 100644 --- a/clang/test/3C/generated_tests/unsafefptrargsafemulti1.c +++ b/clang/test/3C/generated_tests/unsafefptrargsafemulti1.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/generated_tests/unsafefptrargsafemulti2.c b/clang/test/3C/generated_tests/unsafefptrargsafemulti2.c index 598131962e90..f11ae9ddb52f 100644 --- a/clang/test/3C/generated_tests/unsafefptrargsafemulti2.c +++ b/clang/test/3C/generated_tests/unsafefptrargsafemulti2.c @@ -23,20 +23,9 @@ the tool performs conversions*/ /******************************************************************************/ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include struct general { int data; diff --git a/clang/test/3C/graphs2.c b/clang/test/3C/graphs2.c index b3245d17fd1c..44a7a70f6919 100644 --- a/clang/test/3C/graphs2.c +++ b/clang/test/3C/graphs2.c @@ -14,8 +14,6 @@ #include #include -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); /*Structure for storing a graph*/ diff --git a/clang/test/3C/hash.c b/clang/test/3C/hash.c index aa1a2204a484..4bec73c58213 100644 --- a/clang/test/3C/hash.c +++ b/clang/test/3C/hash.c @@ -6,26 +6,8 @@ * Based on hash.c in Very Secure FTPd */ -//#include -//#include -//#include - -#include -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *memcpy( - void *restrict dest - : itype(restrict _Array_ptr) byte_count(n), const void *restrict src - : itype(restrict _Array_ptr) byte_count(n), size_t n) - : itype(_Array_ptr) byte_count(n); -extern void *memset(void *dest - : byte_count(n), int c, size_t n) - : bounds(dest, (_Array_ptr)dest + n); -extern int memcmp(const void *src1 - : byte_count(n), const void *src2 - : byte_count(n), size_t n); +#include +#include _Itype_for_any(T) void vsf_sysutil_memclr(void *p_dest : itype(_Array_ptr) diff --git a/clang/test/3C/inline_anon_structs.c b/clang/test/3C/inline_anon_structs.c index 33f00f0f1a07..9b1406157285 100644 --- a/clang/test/3C/inline_anon_structs.c +++ b/clang/test/3C/inline_anon_structs.c @@ -5,9 +5,7 @@ // RUN: 3c -base-dir=%S -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked %t.checked/inline_anon_structs.c -- | diff %t.checked/inline_anon_structs.c - -#include -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); +#include /*This code ensures conversion happens as expected when an inlinestruct and its associated VarDecl have different locations*/ diff --git a/clang/test/3C/invalidbounds.c b/clang/test/3C/invalidbounds.c index aba9ad29fb23..99fabc5ed989 100644 --- a/clang/test/3C/invalidbounds.c +++ b/clang/test/3C/invalidbounds.c @@ -8,11 +8,8 @@ Regression test for the issue: Here, array bounds should be invalidated when conflicting bounds are assigned. */ -#include - -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -unsigned long strlen(const char *s : itype(_Nt_array_ptr)); +#include +#include int foo() { const char *invalstr = "%b %d %H:%M"; diff --git a/clang/test/3C/k_and_r.c b/clang/test/3C/k_and_r.c index 52ec9ce9a9b8..d74dc0277fd8 100644 --- a/clang/test/3C/k_and_r.c +++ b/clang/test/3C/k_and_r.c @@ -59,7 +59,7 @@ void test5(a, b, c, d, e, f, g, h) struct yy_buffer_state {}; typedef struct yy_buffer_state *YY_BUFFER_STATE; #ifdef YY_USE_PROTOS -void yy_init_buffer(YY_BUFFER_STATE b, FILE *file) +void yy_init_buffer(YY_BUFFER_STATE b, int *file) #else void yy_init_buffer(b, file) YY_BUFFER_STATE b; diff --git a/clang/test/3C/liberal_itypes_ptr.c b/clang/test/3C/liberal_itypes_ptr.c index 40fc3b4bc560..9af4eee80838 100644 --- a/clang/test/3C/liberal_itypes_ptr.c +++ b/clang/test/3C/liberal_itypes_ptr.c @@ -41,10 +41,7 @@ void biz() { // CHECK: b = buz(); } -#include -_Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -_Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); +#include void malloc_test() { int *p = malloc(sizeof(int)); diff --git a/clang/test/3C/linkedlist.c b/clang/test/3C/linkedlist.c index 567c9d4e7bb5..20c9addd6866 100644 --- a/clang/test/3C/linkedlist.c +++ b/clang/test/3C/linkedlist.c @@ -10,8 +10,6 @@ #include #include -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); typedef struct node Node; typedef struct list List; diff --git a/clang/test/3C/malloc_array.c b/clang/test/3C/malloc_array.c index e7c2b7a5805e..288be66084f6 100644 --- a/clang/test/3C/malloc_array.c +++ b/clang/test/3C/malloc_array.c @@ -5,17 +5,7 @@ // RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/malloc_array.c -- | diff %t.checked/malloc_array.c - -#include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); +#include int *foo(int *x) { //CHECK_NOALL: int *foo(int *x : itype(_Ptr)) : itype(_Ptr) { diff --git a/clang/test/3C/malloc_implicit_cast.c b/clang/test/3C/malloc_implicit_cast.c index 721a3def2725..a79fe30ef191 100644 --- a/clang/test/3C/malloc_implicit_cast.c +++ b/clang/test/3C/malloc_implicit_cast.c @@ -11,9 +11,7 @@ // RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s -#include -_Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); +#include #include #ifdef __SIZEOF_INT128__ diff --git a/clang/test/3C/multidef1b.c b/clang/test/3C/multidef1b.c index b7333b9e9f64..0e5890f9b0d1 100644 --- a/clang/test/3C/multidef1b.c +++ b/clang/test/3C/multidef1b.c @@ -5,7 +5,7 @@ // RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %t.checkedNOALL/multidef1b.c %s // RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %t.checkedALL/multidef1b.c %s -extern _Unchecked unsigned long strlen(const char * restrict src : itype(restrict _Nt_array_ptr)); +#include int main(int argc, char **argv) { //CHECK_NOALL: int main(int argc, char **argv : itype(_Ptr<_Ptr>)) { diff --git a/clang/test/3C/multipledecls.c b/clang/test/3C/multipledecls.c index 42d13d0d9a4c..58c02e9fc3d7 100644 --- a/clang/test/3C/multipledecls.c +++ b/clang/test/3C/multipledecls.c @@ -9,13 +9,18 @@ // RUN: 3c -base-dir=%t.checked -addcr %t.checked/multipledecls.c -- | diff %t.checked/multipledecls.c - // expected-no-diagnostics -void gmtime(long *q); -void gmtime(long *q1 : itype(_Ptr)); +// Comment from PR #576: It appears that this test wants to test a specific +// sequence of multiple declarations. Even if the system `gmtime` probably has +// an analogous sequence of declarations, we want to control the sequence +// precisely in this test. So we use our own name for this function to avoid any +// confusion with the system `gmtime`. +void my_gmtime(long *q); +void my_gmtime(long *q1 : itype(_Ptr)); void foo() { long *p; long *p1; - gmtime(p); - gmtime(p1); + my_gmtime(p); + my_gmtime(p1); } //CHECK: _Ptr p = ((void *)0); //CHECK-NEXT: _Ptr p1 = ((void *)0); diff --git a/clang/test/3C/multivardecls.c b/clang/test/3C/multivardecls.c index ceeb47d2708b..629554c10c87 100644 --- a/clang/test/3C/multivardecls.c +++ b/clang/test/3C/multivardecls.c @@ -6,8 +6,7 @@ // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/multivardecls.c -- | diff %t.checked/multivardecls.c - #include -_Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); +#include void test() { int *a = (int *)0, *b = (int *)0; diff --git a/clang/test/3C/overconstrained_merge.c b/clang/test/3C/overconstrained_merge.c index 8d57e1bbc004..7709961a88d0 100644 --- a/clang/test/3C/overconstrained_merge.c +++ b/clang/test/3C/overconstrained_merge.c @@ -10,11 +10,16 @@ // This test only uses -alltypes because of the use of _Array_ptr in the example // (to distinguish from the _Ptr that will be added). -_Itype_for_any(T) void free(void * : itype(_Array_ptr)); + +// This test uses a sequence of declarations of this function that differs in an +// important way from the one for the system `free` (the fully unchecked +// declaration comes second), so we use a different name for this function to +// avoid any confusion with the system `free`. +_Itype_for_any(T) void my_free(void * : itype(_Array_ptr)); void b(void) { char **c; - free(c); + my_free(c); // CHECK: _Array_ptr<_Ptr> c = ((void *)0); - // CHECK: free<_Ptr>(c); + // CHECK: my_free<_Ptr>(c); } -void free(void *); +void my_free(void *); diff --git a/clang/test/3C/partial_checked_arr.c b/clang/test/3C/partial_checked_arr.c index 602876484198..cff42a265cd3 100644 --- a/clang/test/3C/partial_checked_arr.c +++ b/clang/test/3C/partial_checked_arr.c @@ -6,9 +6,7 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/partial_checked_arr.c -- | diff %t.checked/partial_checked_arr.c - -int strcmp(const char *src1 - : itype(_Nt_array_ptr), const char *src2 - : itype(_Nt_array_ptr)); +#include void test0() { _Ptr a = 0; diff --git a/clang/test/3C/pointerarithm.c b/clang/test/3C/pointerarithm.c index 1faa9f13094b..bd729eea5ac3 100644 --- a/clang/test/3C/pointerarithm.c +++ b/clang/test/3C/pointerarithm.c @@ -4,21 +4,9 @@ // RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -addcr -alltypes %t.checked/pointerarithm.c -- | diff %t.checked/pointerarithm.c - -#include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include int *sus(int *x, int *y) { int *z = malloc(sizeof(int) * 2); diff --git a/clang/test/3C/ptrptr.c b/clang/test/3C/ptrptr.c index d2e3cdbcae0d..334b849682a5 100644 --- a/clang/test/3C/ptrptr.c +++ b/clang/test/3C/ptrptr.c @@ -5,21 +5,9 @@ // RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ptrptr.c -- | diff %t.checked/ptrptr.c - -#include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include void f() { int x[5]; diff --git a/clang/test/3C/ptrtoconstarr.c b/clang/test/3C/ptrtoconstarr.c index 24f60bee2674..fe241938472a 100644 --- a/clang/test/3C/ptrtoconstarr.c +++ b/clang/test/3C/ptrtoconstarr.c @@ -6,9 +6,7 @@ // RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ptrtoconstarr.c -- | diff %t.checked/ptrtoconstarr.c - -extern _Unchecked unsigned long -strlen(const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include int bar(void) { //CHECK_ALL: int bar(void) _Checked { diff --git a/clang/test/3C/realloc.c b/clang/test/3C/realloc.c index d0ec3c41ade9..e5f93bab438b 100644 --- a/clang/test/3C/realloc.c +++ b/clang/test/3C/realloc.c @@ -5,13 +5,7 @@ // RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/realloc.c -- | diff %t.checked/realloc.c - -#include -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); +#include void foo(int *w) { //CHECK: void foo(_Ptr w) { diff --git a/clang/test/3C/realloc_complex.c b/clang/test/3C/realloc_complex.c index 73cfcc0c7b7b..1a38097c0af1 100644 --- a/clang/test/3C/realloc_complex.c +++ b/clang/test/3C/realloc_complex.c @@ -10,13 +10,7 @@ /* multiple complex realloc calls */ /**********************************************************/ -#include -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); +#include void foo(int *count) { //CHECK: void foo(_Ptr count) { diff --git a/clang/test/3C/regression_tests_xfail.c b/clang/test/3C/regression_tests_xfail.c index 7c9f68a54d52..f562064c4ef0 100644 --- a/clang/test/3C/regression_tests_xfail.c +++ b/clang/test/3C/regression_tests_xfail.c @@ -8,10 +8,7 @@ // // XFAIL: * -#include - -_Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); +#include unsigned char *func(void) { char *ptr = NULL; diff --git a/clang/test/3C/resolve_itypes.c b/clang/test/3C/resolve_itypes.c index ca1316c89b1a..ce6ebe83ce1c 100644 --- a/clang/test/3C/resolve_itypes.c +++ b/clang/test/3C/resolve_itypes.c @@ -45,8 +45,7 @@ int *biz(void) : itype(_Ptr) { void fuz(int *a : itype(_Ptr)) {} //CHECK: void fuz(_Ptr a) _Checked {} -#include -_Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr) byte_count(size); +#include extern _Itype_for_any(T) void paper_foo(void * : itype(_Array_ptr)); void paper_bar(int *q : itype(_Ptr), int n) { //CHECK_ALL: void paper_bar(_Array_ptr q : count(n), int n) { diff --git a/clang/test/3C/return_not_least.c b/clang/test/3C/return_not_least.c index f0a3c871c343..ec04ee83b6de 100644 --- a/clang/test/3C/return_not_least.c +++ b/clang/test/3C/return_not_least.c @@ -40,9 +40,7 @@ int *foo(void) { return q; } -#include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); +#include int *bar() { //CHECK_NOALL: int *bar(void) : itype(_Ptr) { diff --git a/clang/test/3C/root_cause.c b/clang/test/3C/root_cause.c index 60db65fb7b9a..2e88b4acbdca 100644 --- a/clang/test/3C/root_cause.c +++ b/clang/test/3C/root_cause.c @@ -6,9 +6,7 @@ // This test is unusual in that it checks for the errors in the code -#include -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); +#include void *x; // expected-warning {{Default void* type}} diff --git a/clang/test/3C/single_ptr_calloc.c b/clang/test/3C/single_ptr_calloc.c index 04018b0de7ff..0d33814bdad1 100644 --- a/clang/test/3C/single_ptr_calloc.c +++ b/clang/test/3C/single_ptr_calloc.c @@ -5,9 +5,7 @@ // RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/single_ptr_calloc.c -- | diff %t.checked/single_ptr_calloc.c - -#include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); +#include void foo(int *w) { //CHECK: void foo(_Ptr w) { diff --git a/clang/test/3C/stmtExprA.c b/clang/test/3C/stmtExprA.c index 91da90e5a3e1..02f431bed127 100644 --- a/clang/test/3C/stmtExprA.c +++ b/clang/test/3C/stmtExprA.c @@ -2,9 +2,7 @@ // RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -#include -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); +#include void foo2(int *x) { int *p; diff --git a/clang/test/3C/stmtExprBUG.c b/clang/test/3C/stmtExprBUG.c index a13d17a8dc28..9aecf6602ff8 100644 --- a/clang/test/3C/stmtExprBUG.c +++ b/clang/test/3C/stmtExprBUG.c @@ -3,9 +3,7 @@ // RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - // XFAIL: * -#include -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); +#include /*right now, even though our solving correctly identifies q ought to be checked the rewriter fails to rewrite q to be checked so it appears WILD*/ diff --git a/clang/test/3C/testgenerator.py b/clang/test/3C/testgenerator.py index 66d5ff4122d0..c2cc6b4c7611 100755 --- a/clang/test/3C/testgenerator.py +++ b/clang/test/3C/testgenerator.py @@ -61,20 +61,9 @@ # header that should top every file header = """\ #include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern int printf(const char *restrict format - : itype(restrict _Nt_array_ptr), ...); -extern _Unchecked char *strcpy(char *restrict dest, const char *restrict src - : itype(restrict _Nt_array_ptr)); +#include +#include +#include """ # miscallaneous struct definitions that may or may not be used by the files diff --git a/clang/test/3C/tree.c b/clang/test/3C/tree.c index f24bb8c8c9d1..bcee02390dcd 100644 --- a/clang/test/3C/tree.c +++ b/clang/test/3C/tree.c @@ -2,22 +2,8 @@ // RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s // RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -#include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); -extern _Itype_for_any(T) void free(void *pointer - : itype(_Array_ptr) byte_count(0)); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *memcpy( - void *restrict dest - : itype(restrict _Array_ptr) byte_count(n), const void *restrict src - : itype(restrict _Array_ptr) byte_count(n), size_t n) - : itype(_Array_ptr) byte_count(n); +#include +#include struct tree { int val; diff --git a/clang/test/3C/type_params.c b/clang/test/3C/type_params.c index 9bc38e8a0330..0904e84e15c7 100644 --- a/clang/test/3C/type_params.c +++ b/clang/test/3C/type_params.c @@ -91,16 +91,8 @@ void unsafe(int *a) { // Example issue 153 -#include -_Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); -_Itype_for_any(T) void *memcpy(void *restrict dest - : itype(restrict _Array_ptr) byte_count(n), - const void *restrict src - : itype(restrict _Array_ptr) - byte_count(n), - size_t n) - : itype(_Array_ptr) byte_count(n); +#include +#include void foo(int *p2) { int *p = malloc(2 * sizeof(int)); @@ -160,11 +152,6 @@ void deep(int ****v, int ****w, int ****x, int ****y, int ****z) { // Issue #233. Void type paramters were not being detected by // typeArgsProvidedCheck -_Itype_for_any(T) void *realloc(void *pointer - : itype(_Array_ptr) byte_count(1), - size_t size) - : itype(_Array_ptr) byte_count(size); - // void provided void *example0(void *ptr, unsigned int size) { // CHECK: void *example0(void *ptr, unsigned int size) { diff --git a/clang/test/3C/type_params_xfail1.c b/clang/test/3C/type_params_xfail1.c index 41f11b451fd5..b8eb5604fb5d 100644 --- a/clang/test/3C/type_params_xfail1.c +++ b/clang/test/3C/type_params_xfail1.c @@ -7,9 +7,7 @@ // independent at each call site. // adapted from type_params.c -#include -_Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); +#include _Itype_for_any(T) void incoming_doubleptr(_Array_ptr ptr : itype(_Array_ptr)) { diff --git a/clang/test/3C/unsafeunion.c b/clang/test/3C/unsafeunion.c index 7032d5668b31..055ab5fa7241 100644 --- a/clang/test/3C/unsafeunion.c +++ b/clang/test/3C/unsafeunion.c @@ -5,9 +5,7 @@ // RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s -- // RUN: 3c -base-dir=%t.checked -alltypes %t.checked/unsafeunion.c -- | diff %t.checked/unsafeunion.c - -#include -extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) - : itype(_Array_ptr) byte_count(nmemb * size); +#include union foo { /*fields of a union should never be converted*/ diff --git a/clang/test/3C/user_malloc.c b/clang/test/3C/user_malloc.c index 07150881a603..851da402eba4 100644 --- a/clang/test/3C/user_malloc.c +++ b/clang/test/3C/user_malloc.c @@ -3,12 +3,11 @@ // RUN: 3c -base-dir=%S -use-malloc=my_malloc,your_malloc %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - #include +#include extern _Itype_for_any(T) void *my_malloc(size_t size) : itype(_Array_ptr) byte_count(size); extern _Itype_for_any(T) void *your_malloc(size_t size) : itype(_Array_ptr) byte_count(size); -extern _Itype_for_any(T) void *malloc(size_t size) - : itype(_Array_ptr) byte_count(size); int *foo(void) { int *p = my_malloc(sizeof(int));