Skip to content

Commit 53859f0

Browse files
Run test_updater.py to finish resolving existing diffs.
The changes look harmless aside from whitespace, which will be redone soon anyway. The addition of checked regions is presumably due to #426. (testgenerator.py and processor.py already had no diffs.)
1 parent 2b6f144 commit 53859f0

File tree

8 files changed

+13
-8
lines changed

8 files changed

+13
-8
lines changed

clang/test/3C/checkedregions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void baz(void) {
8080
}
8181

8282
int* g() {
83-
//CHECK: int *g(void) : itype(_Ptr<int>) _Checked {
83+
//CHECK: int *g(void) : itype(_Ptr<int>) _Checked {
8484
return 1;
8585
}
8686

clang/test/3C/compound_literal.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void structs() {
3535

3636
int d;
3737
int *faz = (int*)0;
38-
//CHECK: _Ptr<int> faz = (_Ptr<int>)0;
38+
//CHECK: _Ptr<int> faz = (_Ptr<int>)0;
3939
faz = (&(struct b){&d, (int*) 1})->a;
4040
//CHECK: faz = (&(struct b){&d, (int*) 1})->a;
4141
int *fuz = (int*)0;
@@ -44,7 +44,7 @@ void structs() {
4444

4545
int *f = (int*) 0;
4646
//CHECK_NOALL: int *f = (int*) 0;
47-
//CHECK_ALL: _Array_ptr<int> f = (_Array_ptr<int>) 0;
47+
//CHECK_ALL: _Array_ptr<int> f = (_Array_ptr<int>) 0;
4848
((&(struct c){f})->a)++;
4949
}
5050

@@ -106,7 +106,7 @@ void nested(int* x) {
106106
void silly(int *x) {
107107
//CHECK: void silly(_Ptr<int> x) {
108108
int *a = (int*){x};
109-
//CHECK: _Ptr<int> a = (_Ptr<int>){x};
109+
//CHECK: _Ptr<int> a = (_Ptr<int>){x};
110110

111111
int *b = (int*){(int*) 1};
112112
//CHECK: int *b = (int*){(int*) 1};

clang/test/3C/ex1.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ void foo() {
1010
int *s = &m;
1111
//CHECK: _Ptr<int> s = &m;
1212
int q[5] = { 0 };
13+
//CHECK: int q[5] = { 0 };
1314
int *p = (int *)5;
1415
//CHECK: int *p = (int *)5;
1516
p = q + 3;

clang/test/3C/fn_sets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ int *e() {
7272
//CHECK: return (int*) 1;
7373
}
7474
int *i() {
75-
//CHECK: _Ptr<int> i(void) _Checked {
75+
//CHECK: _Ptr<int> i(void) _Checked {
7676
return 0;
7777
}
7878

clang/test/3C/funcptr1.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ void f(int *(*fp)(int *)) {
1212
int *z = (int *)5;
1313
//CHECK: int *z = (int *)5;
1414
z = fp(x); /* GENERATE CHECK */
15-
//CHECK: z = ((int *)fp(x));
15+
//CHECK: z = ((int *)fp(x)); /* GENERATE CHECK */
1616
}
1717

1818
int *g(int *x) {
@@ -22,5 +22,6 @@ int *g(int *x) {
2222
return 0;
2323
}
2424
void h() {
25+
//CHECK: void h() _Checked {
2526
f(g);
2627
}

clang/test/3C/funcptr2.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ void f(int *(*fp)(int *)) {
1212
int *z = (int *)5;
1313
//CHECK: int *z = (int *)5;
1414
z = fp(x); /* GENERATE CHECK */
15-
//CHECK: z = fp(x);
15+
//CHECK: z = fp(x); /* GENERATE CHECK */
1616
}
1717
int *g2(int *x) {
1818
//CHECK: int *g2(int *x : itype(_Ptr<int>)) : itype(_Ptr<int>) {
@@ -25,6 +25,7 @@ int *g(int *x) {
2525
return 0;
2626
}
2727
void h() {
28+
//CHECK: void h() _Checked {
2829
f(g);
2930
f(g2);
3031
}

clang/test/3C/funcptr4.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ int *g(int *x) {
1818
return 0;
1919
}
2020
void h() {
21+
//CHECK: void h() _Checked {
2122
int *(*fp)(int *) = g;
2223
//CHECK: _Ptr<_Ptr<int> (_Ptr<int> )> fp = g;
2324
f(g);

clang/test/3C/ptrptr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
44
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
55
// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s --
6-
// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ptrptr.c -- | diff -w %t.checked/ptrptr.c -
6+
// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ptrptr.c -- | diff %t.checked/ptrptr.c -
77

88
#include <stddef.h>
99
#include <stddef.h>
@@ -16,6 +16,7 @@ extern _Unchecked char *strcpy(char * restrict dest, const char * restrict src :
1616

1717
void f() {
1818
int x[5];
19+
//CHECK: int x[5];
1920
int *pa = x;
2021
//CHECK: int *pa = x;
2122
pa += 2;

0 commit comments

Comments
 (0)