Skip to content

Commit addfe37

Browse files
committed
another round ot test cleanup - dev/null, f3c-tool, xfail
1 parent 9bcc559 commit addfe37

36 files changed

+60
-63
lines changed

clang/test/3C/allarrays.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// 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+
// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused -
33

44
int* foo();
55
//CHECK: _Array_ptr<int> foo(_Array_ptr<int> r);

clang/test/3C/arrboundsadvanced.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// 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+
// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused -
33

44
/*
55
Advanced array-bounds inference (based on control-dependencies).

clang/test/3C/arrboundsbasic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s
2-
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
2+
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused -
33

44

55
/*

clang/test/3C/arrboundsbasicinfer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s
2-
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
2+
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused -
33

44

55
/*

clang/test/3C/arrboundsbyte.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s
2-
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
2+
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused -
33

44

55
/*

clang/test/3C/arrboundsheuristics.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
// Checks wrong array heuristics.
44
//
55
// RUN: 3c -alltypes %s | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
6+
// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused -
67
// RUN: 3c %s | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
7-
// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
8+
// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o %t2.unused -
89

910
int *glob;
1011
int lenplusone;

clang/test/3C/arrboundsinfer2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s
2-
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
2+
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused -
33

44

55
/*

clang/test/3C/arrtestsBUG.c renamed to clang/test/3C/arrtests_xfail.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
// XFAIL: *
21
// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines %s
2+
// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused -
3+
34
// XFAIL: *
45

56
/*

clang/test/3C/basic_inter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Tests properties about constraint propagation between functions.
44
//
55
// RUN: 3c %s | FileCheck -match-full-lines %s
6-
// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
6+
// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o %t1.unused -
77
//
88

99
int funcdecl(int *ptr, int *iptr, int *wild);

clang/test/3C/basic_inter_field_ntarr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// Tests rewriting of Nt_array_ptrs within structure fields
44

55
// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s
6+
// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused -
67
//
78

89
unsigned long strlen(const char *s : itype(_Nt_array_ptr<const char>)) ;

clang/test/3C/basic_inter_ntarr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Tests rewriting and propagation of Nt_array_ptr constraints across functions.
44
//
55
// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s
6-
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
6+
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused -
77
//
88
char *strstr(const char *s1 : itype(_Nt_array_ptr<const char>),
99
const char *s2 : itype(_Nt_array_ptr<const char>)) : itype(_Nt_array_ptr<char>);

clang/test/3C/basic_local_ntarr.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
//
33
// Tests basic rewriting of Nt_array_ptrs
44

5-
// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines %s
5+
// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s
6+
// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused -
67
//
78

89
unsigned long strlen(const char *s : itype(_Nt_array_ptr<const char>));
@@ -18,7 +19,7 @@ int main() {
1819
int b;
1920
// this will make a as NTARR
2021
b = strlen(a);
21-
// this will make C as NTArr
22+
// this will make C as PTR
2223
c = strstr("Hello", "World");
2324
// this should mark d as WILD.
2425
d = (int*)0xdeadbeef;

clang/test/3C/basic_return_itype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Tests properties about rewriter for return type when it is an itype
44
//
55
// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s
6-
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
6+
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused -
77
//
88

99
static int funcvar;

clang/test/3C/checkedregionvoid.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// RUN: 3c -addcr %s | FileCheck -match-full-lines --check-prefixes="CHECK" %s
2+
// RUN: 3c -addcr %s | %clang -c -fcheckedc-extension -x c -o %t1.unused -
23

3-
// Currently not running clang on the output,
4-
// since it cannot find "dummy.h", even with -L%S
5-
6-
#include "dummy.h"
7-
// Dummy to cause output
4+
void unsafe(void *);// Dummy to cause output
85
void f(int *x) {}
96
//CHECK: void f(_Ptr<int> x) _Checked {}
107

clang/test/3C/contextsensitivebounds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Test for context sensitive bounds.
33
**/
44

55
// RUN: 3c -alltypes %s | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
6-
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
6+
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unusedl -
77
// RUN: 3c %s | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
8-
// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
8+
// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o %t2.unused -
99

1010
_Itype_for_any(T) void *somefunc(unsigned long size) : itype(_Array_ptr<T>) byte_count(size);
1111
struct hash_node

clang/test/3C/contextsensitivebounds1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Test for context sensitive bounds for internal functions.
33
**/
44

55
// RUN: 3c -alltypes %s | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
6-
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
6+
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused -
77
// RUN: 3c %s | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
8-
// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
8+
// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o %t2.unused -
99

1010
_Itype_for_any(T) void *somefunc(unsigned long size) : itype(_Array_ptr<T>) byte_count(size);
1111
struct hash_node

clang/test/3C/difftypes_xfail1.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
//RUN: 3c -base-dir=%S -output-postfix=checked %s %S/difftypes_xfail2.c
2-
// XFAIL: *
2+
3+
// XFAIL: *
4+
5+
// The desired behavior in this case is to fail, so other checks are omitted
36

47
_Ptr<int> foo(int, char);

clang/test/3C/difftypes_xfail2.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
//RUN: 3c -base-dir=%S -output-postfix=checked %s %S/difftypes_xfail1.c
2+
23
// XFAIL: *
34

5+
// The desired behavior in this case is to fail, so other checks are omitted
6+
47
int * foo(int, char *);

clang/test/3C/dummy.h

Lines changed: 0 additions & 2 deletions
This file was deleted.

clang/test/3C/extGVarbar1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//RUN: %clang -c %S/extGVarbar1.checked.c %S/extGVarbar2.checked.c
44
//RUN: rm %S/extGVarbar1.checked.c %S/extGVarbar2.checked.c
55

6-
/*first of the bar files*/
6+
// This test cannot use pipes because it requires multiple output files
77

88
extern int *x;
99
/*y will be defined in bar2.c*/

clang/test/3C/extGVarm1.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
//RUN: %clang -c %S/extGVarm1.checked.c %S/extGVarm2.checked.c %S/extGVarm3.checked.c
44
//RUN: rm %S/extGVarm1.checked.c %S/extGVarm2.checked.c %S/extGVarm3.checked.c
55

6+
// This test cannot use pipes because it requires multiple output files
7+
68
extern int *y;
79
//CHECK: extern _Ptr<int> y;
810

clang/test/3C/lowerbound.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// Generates graph q0 --> ARR --> q1, to confirm that bound bound
22
// constraints are properly solved
33
// The following test is supposed to fail with the current tool.
4-
// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines %s
4+
// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s
5+
// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t.unused -
56
//
67

78
_Array_ptr<int> foo(_Array_ptr<int> x);

clang/test/3C/lowerboundBUG.c

Lines changed: 0 additions & 15 deletions
This file was deleted.

clang/test/3C/manyprotos.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: 3c -alltypes %s | FileCheck -match-full-lines --check-prefixes="CHECK" %s
2-
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
2+
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused -
33

44
int foo();
55
//CHECK: int foo(_Array_ptr<int> x : count(y), int y);

clang/test/3C/multidef_xfail1.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
//RUN: 3c -base-dir=%S -output-postfix=checked %s %S/multidef_xfail2.c
1+
// RUN: 3c -base-dir=%S -output-postfix=checked %s %S/multidef_xfail2.c
2+
23
// XFAIL: *
34

5+
// The desired behavior in this case is to fail, so other checks are omitted
6+
47
_Ptr<int> foo(int x, char * y) {
58
x = x + 4;
69
int *z = &x;

clang/test/3C/multidef_xfail2.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
//RUN: 3c -base-dir=%S -output-postfix=checked %s %S/multidef_xfail1.c
2-
// XFAIL: *
1+
// RUN: 3c -base-dir=%S -output-postfix=checked %s %S/multidef_xfail1.c
2+
3+
// XFAIL: *
4+
5+
// The desired behavior in this case is to fail, so other checks are omitted
36

47
int * foo(int x, _Ptr<char> y) {
58
x = x + 4;

clang/test/3C/no_casts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: 3c %s | count 0
2-
// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
2+
// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o %t.unused -
33

44
void foo(char *a);
55
void bar(int *a);

clang/test/3C/noproto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: 3c -addcr %s | FileCheck -match-full-lines --check-prefixes="CHECK" %s
2-
// RUN: 3c -addcr %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
2+
// RUN: 3c -addcr %s | %clang -c -fcheckedc-extension -x c -o %t.unused -
33

44
int foo(int x) {
55
//CHECK: int foo(int x) {

clang/test/3C/order.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: 3c %s | FileCheck -match-full-lines %s
2-
// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
2+
// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o %t.unused -
33

44
int foo1(int x, int *y);
55
//CHECK: int foo1(int x, int *y : itype(_Ptr<int>));

clang/test/3C/partial_checked_arr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// 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+
// RUN: 3c -addcr -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused -
33
// RUN: 3c -addcr %s | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
4-
// RUN: 3c -addcr %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o /dev/null -
4+
// RUN: 3c -addcr %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t2.unused -
55
// RUN: 3c -alltypes %s > %t
66
// RUN: 3c -alltypes %t | count 0
77

clang/test/3C/patch_issue_272.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// 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+
// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t.unused -
33

44
/********************************************************************/
55
/* Tests to keep pointer level from */

clang/test/3C/pointerarithm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: 3c -alltypes -addcr %s | FileCheck -match-full-lines %s
2-
// RUN: 3c -alltypes -addcr %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
2+
// RUN: 3c -alltypes -addcr %s | %clang -c -fcheckedc-extension -x c -o %t.unused -
33
// RUN: 3c -addcr -alltypes -output-postfix=checked %s
44
// RUN: 3c -addcr -alltypes %S/pointerarithm.checked.c | count 0
55
// RUN: rm %S/pointerarithm.checked.c

clang/test/3C/regression_testsBUG.c renamed to clang/test/3C/regression_tests_xfail.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
//
33
// Tests 3c tool for any regressions.
44
//
5-
// The following test is supposed to fail with the current tool.
6-
// XFAIL: *
7-
// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines %s
5+
// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s
6+
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t.unused -
87
//
98
// XFAIL: *
109

clang/test/3C/root_cause.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: 3c -extra-arg="-Wno-everything" -alltypes -warn-root-cause %s 2>&1 1>/dev/null | FileCheck %s
1+
// RUN: 3c -extra-arg="-Wno-everything" -alltypes -warn-root-cause %s 2>&1 1>%t.unused | FileCheck %s
2+
3+
// This test is unusual in that it checks for the errors in the code
24

35
#include <stddef.h>
46
extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr<T>) byte_count(size);

clang/test/3C/stmtexpr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: 3c -addcr %s | FileCheck -match-full-lines --check-prefixes="CHECK" %s
2-
// RUN: 3c -addcr %s | %clang -c -fcheckedc-extension -x c -o /dev/null -
1+
// RUN: 3c -addcr %s | FileCheck -match-full-lines --check-prefixes="CHECK" %s
2+
// RUN: 3c -addcr %s | %clang -c -fcheckedc-extension -x c -o %t.unused -
33

44
int foo(void) {
55
//CHECK: int foo(void) {

clang/test/3C/untypedprototypes.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// 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 -
3-
4-
// Currently not possible to run clang on the output,
5-
// since 3c cannot yet determine array bounds in this case
2+
// RUN: 3c -alltypes %s | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t.unused -
63

74
int *foo();
85
//CHECK: _Array_ptr<int> foo(_Array_ptr<int> q);

0 commit comments

Comments
 (0)