Skip to content

Commit 7aa29aa

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 7aa29aa

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;

clang/test/3C/arrboundsinfer2.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/arrtests_xfail.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
// XFAIL: *
55

clang/test/3C/basic.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
2-
// RUN: 3c %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
3-
// RUN: 3c %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
1+
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
2+
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
3+
// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
44
#include <stdio.h>
55
#include <stdlib.h>
66
#include <string.h>

clang/test/3C/basic_checks.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
// Tests properties about type re-writing and replacement, and simple function
44
// return value stuff.
55
//
6-
// RUN: 3c -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK","CHECK_NEXT" %s
7-
// RUN: 3c %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK","CHECK-NEXT" %s
8-
// RUN: 3c %s -- | %clang_cc1 -verify -fcheckedc-extension -x c -
6+
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK","CHECK_NEXT" %s
7+
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK","CHECK-NEXT" %s
8+
// RUN: 3c -base-dir=%S %s -- | %clang_cc1 -verify -fcheckedc-extension -x c -
99
// expected-no-diagnostics
1010
//
1111

clang/test/3C/basic_inter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//
33
// Tests properties about constraint propagation between functions.
44
//
5-
// RUN: 3c %s | FileCheck -match-full-lines %s
6-
// RUN: 3c %s | %clang -c -fcheckedc-extension -x c -o %t1.unused -
5+
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s
6+
// RUN: 3c -base-dir=%S %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.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//
33
// Tests properties about constraint propagation of structure fields
44
// across functions
5-
// RUN: 3c %s -- | FileCheck -match-full-lines %s
6-
// RUN: 3c %s -- | %clang_cc1 -verify -fcheckedc-extension -x c -
5+
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s
6+
// RUN: 3c -base-dir=%S %s -- | %clang_cc1 -verify -fcheckedc-extension -x c -
77
// expected-no-diagnostics
88
//
99

clang/test/3C/basic_inter_field_arr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//
33
// Tests properties about arr constraints propagation.
44
//
5-
// RUN: 3c %s -- | FileCheck -match-full-lines %s
6-
// RUN: 3c %s -- | %clang_cc1 -verify -fcheckedc-extension -x c -
5+
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s
6+
// RUN: 3c -base-dir=%S %s -- | %clang_cc1 -verify -fcheckedc-extension -x c -
77
// expected-no-diagnostics
88
//
99
// This tests the propagation of constraints

clang/test/3C/basic_inter_field_ntarr.c

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

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 -
5+
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s
6+
// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused -
77
//
88

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

clang/test/3C/basic_inter_ntarr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//
33
// Tests rewriting and propagation of Nt_array_ptr constraints across functions.
44
//
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 -
5+
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s
6+
// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -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_field.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//
33
// Tests properties about type re-writing and replacement of structure members
44
//
5-
// RUN: 3c %s -- | FileCheck -match-full-lines %s
6-
// RUN: 3c %s -- | %clang_cc1 -verify -fcheckedc-extension -x c -
5+
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s
6+
// RUN: 3c -base-dir=%S %s -- | %clang_cc1 -verify -fcheckedc-extension -x c -
77
// expected-no-diagnostics
88
//
99

clang/test/3C/basic_local_ntarr.c

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

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 -
5+
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s
6+
// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -f3c-tool -fcheckedc-extension -x c -o %t1.unused -
77
//
88

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

clang/test/3C/basic_return_itype.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//
33
// Tests properties about rewriter for return type when it is an itype
44
//
5-
// RUN: 3c -alltypes %s | FileCheck -match-full-lines %s
6-
// RUN: 3c -alltypes %s | %clang -c -fcheckedc-extension -x c -o %t1.unused -
5+
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s
6+
// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o %t1.unused -
77
//
88

99
static int funcvar;

clang/test/3C/bodiless.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: 3c %s > %S/temp_bodiless.c
1+
// RUN: 3c -base-dir=%S %s > %S/temp_bodiless.c --
22
// RUN: %clang -c %S/temp_bodiless.c
33
// RUN: FileCheck -match-full-lines --input-file %S/temp_bodiless.c %s
44
// RUN: rm %S/temp_bodiless.c

clang/test/3C/boundary_tests.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// Tests for 3C.
22
//
3-
// RUN: 3c -addcr %s -- | FileCheck -match-full-lines %s
4-
// RUN: 3c -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c -
5-
// RUN: 3c -addcr -output-postfix=checked %s
6-
// RUN: 3c -addcr %S/boundary_tests.checked.c -- | count 0
7-
// RUN: rm %S/boundary_tests.checked.c
3+
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s
4+
// RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c -
5+
// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s --
6+
// RUN: 3c -base-dir=%t.checked -addcr %t.checked/boundary_tests.c -- | diff %t.checked/boundary_tests.c -
87
// expected-no-diagnostics
98

109
void do_something(int *a, int b) {

clang/test/3C/bounds_interface.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// Tests for the 3C.
22
//
3-
// RUN: 3c -addcr %s -- -fcheckedc-extension | FileCheck -match-full-lines %s
4-
// RUN: 3c -addcr %s -- -fcheckedc-extension | %clang_cc1 -verify -fcheckedc-extension -x c -
5-
// RUN: 3c -addcr -output-postfix=checked %s
6-
// RUN: 3c -addcr %S/bounds_interface.checked.c -- | count 0
7-
// RUN: rm %S/bounds_interface.checked.c
3+
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s
4+
// RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c -
5+
// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s --
6+
// RUN: 3c -base-dir=%t.checked -addcr %t.checked/bounds_interface.c -- | diff %t.checked/bounds_interface.c -
87
// expected-no-diagnostics
98
//
109

clang/test/3C/checkedptrret.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 -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 -
33

44

55
int* foo() {

clang/test/3C/checkedregioninterweave.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 -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 -
33

44

55
void foo(int *x) {

clang/test/3C/checkedregionsitypeparams.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 -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 -
33

44
struct A {
55
int b;

clang/test/3C/checkedregionvariadicBUG.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 -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 -
33
// XFAIL: *
44

55
#include <stdarg.h>

clang/test/3C/checkedregionvoid.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 %t1.unused -
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 %t1.unused -
33

44
void unsafe(void *);// Dummy to cause output
55
void f(int *x) {}

clang/test/3C/complex_expression.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
// Tests for 3C.
22
//
33
// Tests 3c tool for complex expressions
4-
// RUN: 3c -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK","CHECK_NEXT" %s
5-
// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK","CHECK_NEXT" %s
6-
// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
7-
// RUN: 3c -addcr -output-postfix=checked %s
8-
// RUN: 3c -addcr %S/complex_expression.checked.c -- | count 0
9-
// RUN: rm %S/complex_expression.checked.c
4+
// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK","CHECK_NEXT" %s
5+
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK","CHECK_NEXT" %s
6+
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
7+
// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s --
8+
// RUN: 3c -base-dir=%t.checked -addcr %t.checked/complex_expression.c -- | diff %t.checked/complex_expression.c -
109

1110
#include <stddef.h>
1211

clang/test/3C/const_tests.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
//
33
// Checks for conversions involving const-qualified types.
44
//
5-
// RUN: 3c -addcr %s -- | FileCheck -match-full-lines %s
6-
// RUN: 3c -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c -
7-
// RUN: 3c -addcr -output-postfix=checked %s
8-
// RUN: 3c -addcr %S/const_tests.checked.c -- | count 0
9-
// RUN: rm %S/const_tests.checked.c
5+
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s
6+
// RUN: 3c -base-dir=%S -addcr %s -- | %clang_cc1 -verify -fcheckedc-extension -x c -
7+
// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s --
8+
// RUN: 3c -base-dir=%t.checked -addcr %t.checked/const_tests.c -- | diff %t.checked/const_tests.c -
109
// expected-no-diagnostics
1110

1211
void cst1(const int *a) {

clang/test/3C/contextsensitivebounds.c

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

5-
// 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 %t1.unusedl -
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 -fcheckedc-extension -x c -o %t1.unusedl -
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
_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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
Test for context sensitive bounds for internal functions.
33
**/
44

5-
// 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 %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 -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
_Itype_for_any(T) void *somefunc(unsigned long size) : itype(_Array_ptr<T>) byte_count(size);
1111
struct hash_node

clang/test/3C/definedType.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
// RUN: 3c -addcr -alltypes %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 -alltypes -output-postfix=checked %s
5-
// RUN: 3c -alltypes %S/definedType.checked.c | diff %S/definedType.checked.c -
6-
// RUN: rm %S/definedType.checked.c
1+
// RUN: 3c -base-dir=%S -addcr -alltypes %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 -alltypes -output-dir=%t.checked %s --
5+
// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/definedType.c -- | diff %t.checked/definedType.c -
76

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

0 commit comments

Comments
 (0)