File tree 9 files changed +15
-21
lines changed
9 files changed +15
-21
lines changed Original file line number Diff line number Diff line change 1
1
// RUN: 3c -alltypes %s | FileCheck -match-full-lines --check-prefixes="CHECK" %s
2
-
3
- // Currently not possible to run clang on the output,
4
- // since 3c cannot yet determine array bounds for q
2
+ // RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o /dev/null -
5
3
6
4
int * foo ();
7
5
//CHECK: _Array_ptr<int> foo(_Array_ptr<int> r);
Original file line number Diff line number Diff line change 1
1
// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s
2
-
3
- // Currently not possible to run clang on the output,
4
- // since 3c cannot yet determine array bounds for intarr
2
+ // RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o /dev/null -
5
3
6
4
/*
7
5
Advanced array-bounds inference (based on control-dependencies).
@@ -19,12 +17,12 @@ struct foo1 {
19
17
unsigned ml ;
20
18
};
21
19
//CHECK: _Array_ptr<int> x : count(ml);
20
+ unsigned FooLenD ;
21
+ unsigned FooLen ;
22
22
struct foo * * FL ;
23
23
int * intarr ;
24
24
//CHECK: _Array_ptr<_Ptr<struct foo>> FL : count(FooLen) = ((void *)0);
25
25
//CHECK: _Array_ptr<int> intarr = ((void *)0);
26
- unsigned FooLenD ;
27
- unsigned FooLen ;
28
26
void intcopy (int * arr , int * ptr , int len ) {
29
27
int i ;
30
28
for (i = 0 ; i < len ; i ++ ) {
Original file line number Diff line number Diff line change 3
3
//RUN: %clang -c %S/extGVarbar2.checked2.c %S/extGVarbar1.checked2.c
4
4
//RUN: rm %S/extGVarbar1.checked2.c %S/extGVarbar2.checked2.c
5
5
6
- /*second of the bar files*/
6
+ // This test cannot use pipes because it requires multiple output files
7
7
8
8
int w = 2 ;
9
9
int * y = & w ;
Original file line number Diff line number Diff line change 3
3
//RUN: %clang -c %S/extGVarm2.checked2.c %S/extGVarm3.checked2.c %S/extGVarm1.checked2.c
4
4
//RUN: rm %S/extGVarm1.checked2.c %S/extGVarm2.checked2.c %S/extGVarm3.checked2.c
5
5
6
+ // This test cannot use pipes because it requires multiple output files
7
+
6
8
extern int * x ;
7
9
//CHECK: extern int *x;
8
10
Original file line number Diff line number Diff line change 3
3
//RUN: %clang -c %S/extGVarm3.checked3.c %S/extGVarm2.checked3.c %S/extGVarm1.checked3.c
4
4
//RUN: rm %S/extGVarm1.checked3.c %S/extGVarm2.checked3.c %S/extGVarm3.checked3.c
5
5
6
- // This test cannot use pipes because it uses multiple input files
6
+ // This test cannot use pipes because it requires multiple output files
7
7
8
8
extern int * x ;
9
9
//CHECK: extern int *x;
Original file line number Diff line number Diff line change 1
1
// RUN: 3c -alltypes %s | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
2
2
3
3
// Currently not possible to run clang on the output,
4
- // since 3c cannot yet determine array bounds for hash_get_bucket
4
+ // there is an error reported at https://github.com/correctcomputation/checkedc-clang/issues/349
5
5
6
6
/*
7
7
* Based on hash.c in Very Secure FTPd
Original file line number Diff line number Diff line change 1
1
// RUN: 3c -addcr -alltypes %s | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
2
+ // RUN: 3c -addcr -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o /dev/null -
2
3
// RUN: 3c -addcr %s | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
3
- // RUN: 3c -alltypes -output-postfix=checked %s
4
- // RUN: 3c -alltypes %S/partial_checked_arr.checked.c | count 0
5
- // RUN: rm %S/partial_checked_arr.checked.c
6
-
7
- // Currently not possible to run clang on the output,
8
- // since 3c cannot yet determine array bounds in this case
4
+ // RUN: 3c -addcr %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o /dev/null -
5
+ // RUN: 3c -alltypes %s > %t
6
+ // RUN: 3c -alltypes %t | count 0
9
7
10
8
int strcmp (const char * src1 : itype (_Nt_array_ptr < const char > ),
11
9
const char * src2 : itype (_Nt_array_ptr < const char > ));
Original file line number Diff line number Diff line change 1
1
// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s
2
+ // RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o /dev/null -
2
3
3
4
/********************************************************************/
4
5
/* Tests to keep pointer level from */
5
6
/* https://github.com/correctcomputation/checkedc-clang/issues/272 */
6
- /* */
7
- /* Currently not possible to run clang on the output, */
8
- /* since 3c cannot yet determine full array bounds in this case */
9
- /* */
10
7
/********************************************************************/
11
8
12
9
int * a [];
Original file line number Diff line number Diff line change 1
1
// RUN: 3c -alltypes %s | FileCheck -match-full-lines --check-prefixes="CHECK" %s
2
+ // RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o /dev/null -
2
3
3
4
// Currently not possible to run clang on the output,
4
5
// since 3c cannot yet determine array bounds in this case
You can’t perform that action at this time.
0 commit comments