Skip to content

Commit b245b59

Browse files
Update RUN commands of unmanaged tests.
This was partially scripted, but there are enough special cases that it deserves some manual review. typedefs, typedefbounds: Turn the commented-out commands for an idempotence test into a real test, since it passes. Addition of "rm -rf %t*" lines is split into a separate commit to make this diff easier for naive diff tools (e.g., GitHub) to review by avoiding breaking the alignment of corresponding old and new commands.
1 parent e187fd5 commit b245b59

File tree

101 files changed

+312
-355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+312
-355
lines changed

clang/test/3C/addrof_crash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: 3c -alltypes %s -- | FileCheck %s
2-
// RUN: 3c -alltypes %s -- | %clang_cc1 -fno-builtin -verify -fcheckedc-extension -x c -
1+
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck %s
2+
// RUN: 3c -base-dir=%S -alltypes %s -- | %clang_cc1 -fno-builtin -verify -fcheckedc-extension -x c -
33

44
// No conversions expected for these two, they just shouldn't crash
55

clang/test/3C/allarrays.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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 %t1.unused -
1+
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s
2+
// RUN: 3c -base-dir=%S -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/alloc_type_param.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
2-
// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
3-
// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
4-
// RUN: 3c -output-postfix=checked -alltypes %s
5-
// RUN: 3c -alltypes %S/alloc_type_param.checked.c -- | count 0
6-
// RUN: rm %S/alloc_type_param.checked.c
1+
// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
2+
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
3+
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
4+
// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s --
5+
// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/alloc_type_param.c -- | diff %t.checked/alloc_type_param.c -
76

87
#include <stddef.h>
98
extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr<T>) byte_count(nmemb * size);

clang/test/3C/allocator.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
//
33
// Tests for malloc and friends.
44
//
5-
// RUN: 3c %s -- | FileCheck -match-full-lines %s
6-
// RUN: 3c %s -- | %clang_cc1 -fno-builtin -verify -fcheckedc-extension -x c -
7-
// RUN: 3c -output-postfix=checked %s
8-
// RUN: 3c %S/allocator.checked.c -- | count 0
9-
// RUN: rm %S/allocator.checked.c
5+
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s
6+
// RUN: 3c -base-dir=%S %s -- | %clang_cc1 -fno-builtin -verify -fcheckedc-extension -x c -
7+
// RUN: 3c -base-dir=%S -output-dir=%t.checked %s --
8+
// RUN: 3c -base-dir=%t.checked %t.checked/allocator.c -- | diff %t.checked/allocator.c -
109
// expected-no-diagnostics
1110
//
1211
typedef __SIZE_TYPE__ size_t;

clang/test/3C/alreadychecked.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
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 -
3-
// RUN: 3c -output-postfix=checked -alltypes %s
4-
// RUN: 3c -alltypes %S/alreadychecked.checked.c -- | count 0
5-
// RUN: rm %S/alreadychecked.checked.c
1+
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s
2+
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
3+
// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s --
4+
// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/alreadychecked.c -- | diff %t.checked/alreadychecked.c -
65

76
int fib(int n) _Checked
87
//CHECK: int fib(int n) _Checked

clang/test/3C/arrboundsadvanced.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// 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 -
1+
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s
2+
// RUN: 3c -base-dir=%S -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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s
2-
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused -
1+
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s
2+
// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused -
33

44

55
/*

clang/test/3C/arrboundsbasicinfer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s
2-
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused -
1+
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s
2+
// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused -
33

44

55
/*

clang/test/3C/arrboundsbyte.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s
2-
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused -
1+
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s
2+
// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused -
33

44

55
/*

clang/test/3C/arrboundsheuristics.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
//
33
// Checks wrong array heuristics.
44
//
5-
// 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 -
7-
// RUN: 3c %s | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
8-
// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o %t2.unused -
5+
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
6+
// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused -
7+
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
8+
// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o %t2.unused -
99

1010
int *glob;
1111
int lenplusone;

0 commit comments

Comments
 (0)