Skip to content

Commit

Permalink
Fix regression tests to not create temp files outside the lit temp di…
Browse files Browse the repository at this point in the history
…rectory. (#624)

* Follow new guideline: Avoid `cd DIR && FOO` in RUN lines.

Instead, put `FOO` on a separate run line. `cd` affects later RUN lines,
and `cd DIR && FOO` could mislead the reader that it doesn't and that's
why we needed to put both parts on one line. I added the proposed
guideline to #346.

I'm changing the existing tests before changing more tests to use `cd`
as part of this PR.

* Add `-o /dev/null` to clang commands that use `-` as input.

* Add -working-directory to clang commands with named input files.

* `cd` to a temporary directory for `3c -dump-stats` commands.
  • Loading branch information
mattmccutchen-cci authored Jun 22, 2021
1 parent 157e2cd commit 91db852
Show file tree
Hide file tree
Showing 34 changed files with 45 additions and 38 deletions.
2 changes: 1 addition & 1 deletion clang/test/3C/addrof_crash.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck %s
// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fno-builtin -Xclang -verify -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fno-builtin -Xclang -verify -fcheckedc-extension -x c -o /dev/null -

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

Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/allocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// RUN: rm -rf %t*
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s
// RUN: 3c -base-dir=%S %s -- | %clang -c -fno-builtin -Xclang -verify -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S %s -- | %clang -c -fno-builtin -Xclang -verify -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S -output-dir=%t.checked %s --
// RUN: 3c -base-dir=%t.checked %t.checked/allocator.c -- | diff %t.checked/allocator.c -
// expected-no-diagnostics
Expand Down
5 changes: 3 additions & 2 deletions clang/test/3C/base_subdir/canwrite_constraints.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
// not allow canwrite_constraints.h to change, and the internal types of q and
// the return should remain wild.
//
// RUN: cd %S && 3c -alltypes -addcr -output-dir=%t.checked/base_subdir -warn-all-root-cause %s -- -Xclang -verify
// RUN: cd %S
// RUN: 3c -alltypes -addcr -output-dir=%t.checked/base_subdir -warn-all-root-cause %s -- -Xclang -verify
// RUN: FileCheck -match-full-lines -check-prefixes=CHECK_LOWER --input-file %t.checked/base_subdir/canwrite_constraints.c %s
// RUN: test ! -f %t.checked/canwrite_constraints.checked.h

// "Higher" case: When -base-dir is set to the parent directory, we can change
// canwrite_constraints.h, so both q and the return should become checked.
//
// RUN: cd %S && 3c -alltypes -addcr -base-dir=.. -output-dir=%t.checked2 %s --
// RUN: 3c -alltypes -addcr -base-dir=.. -output-dir=%t.checked2 %s --
// RUN: FileCheck -match-full-lines -check-prefixes=CHECK_HIGHER --input-file %t.checked2/base_subdir/canwrite_constraints.c %s
// RUN: FileCheck -match-full-lines -check-prefixes=CHECK_HIGHER --input-file %t.checked2/canwrite_constraints.h %S/../canwrite_constraints.h

Expand Down
3 changes: 2 additions & 1 deletion clang/test/3C/base_subdir/canwrite_constraints_symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
// Now 3C should know that it can't write to base_subdir_partial_defn.h because
// the symlink goes out of the base dir.
//
// RUN: cd %t.base && 3c -addcr canwrite_constraints_symlink.c -- -Xclang -verify
// RUN: cd %t.base
// RUN: 3c -addcr canwrite_constraints_symlink.c -- -Xclang -verify

// expected-error@base_subdir_partial_defn.h:1 {{3C internal error: 3C generated changes to this file even though it is not allowed to write to the file}}
// expected-note@*:* {{-dump-unwritable-changes}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
// an error diagnostic.
// (https://github.com/correctcomputation/checkedc-clang/issues/387)

// RUN: cd %S && 3c -addcr %s -- -Xclang -verify
// RUN: cd %S
// RUN: 3c -addcr %s -- -Xclang -verify

// expected-error@../base_subdir_partial_defn.h:1 {{3C internal error: 3C generated changes to this file even though it is not allowed to write to the file}}
// expected-note@*:* {{-dump-unwritable-changes}}
Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/basic_checks.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
// RUN: 3c -base-dir=%S %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -o /dev/null -
// expected-no-diagnostics
//

Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/basic_inter_field.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Tests properties about constraint propagation of structure fields
// across functions
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s
// RUN: 3c -base-dir=%S %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -o /dev/null -
// expected-no-diagnostics
//

Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/basic_inter_field_arr.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Tests properties about arr constraints propagation.
//
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s
// RUN: 3c -base-dir=%S %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -o /dev/null -
// expected-no-diagnostics
//
// This tests the propagation of constraints
Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/basic_local_field.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Tests properties about type re-writing and replacement of structure members
//
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s
// RUN: 3c -base-dir=%S %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -o /dev/null -
// expected-no-diagnostics
//

Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/boundary_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// RUN: rm -rf %t*
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s --
// RUN: 3c -base-dir=%t.checked -addcr %t.checked/boundary_tests.c -- | diff %t.checked/boundary_tests.c -
// expected-no-diagnostics
Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/bounds_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// RUN: rm -rf %t*
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s --
// RUN: 3c -base-dir=%t.checked -addcr %t.checked/bounds_interface.c -- | diff %t.checked/bounds_interface.c -
// expected-no-diagnostics
Expand Down
4 changes: 2 additions & 2 deletions clang/test/3C/cant_be_nt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
//
// Checks to make sure _Nt_arrrays only contain pointers & integers
//
// RUN: 3c -alltypes -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -
// RUN: 3c -alltypes -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
// RUN: 3c -alltypes -base-dir=%S %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
// expected-no-diagnostics
Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/const_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// RUN: rm -rf %t*
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s --
// RUN: 3c -base-dir=%t.checked -addcr %t.checked/const_tests.c -- | diff %t.checked/const_tests.c -
// expected-no-diagnostics
Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/extGVarbar1.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//RUN: rm -rf %t*
//RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/extGVarbar2.c --
//RUN: FileCheck -match-full-lines --input-file %t.checked/extGVarbar1.c %s
//RUN: %clang -c %t.checked/extGVarbar1.c %t.checked/extGVarbar2.c
//RUN: %clang -working-directory=%t.checked -c extGVarbar1.c extGVarbar2.c

// This test cannot use pipes because it requires multiple output files

Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/extGVarbar2.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//RUN: rm -rf %t*
//RUN: 3c -base-dir=%S -output-dir=%t.checked2 %s %S/extGVarbar1.c --
//RUN: FileCheck -match-full-lines --input-file %t.checked2/extGVarbar2.c %s
//RUN: %clang -c %t.checked2/extGVarbar2.c %t.checked2/extGVarbar1.c
//RUN: %clang -working-directory=%t.checked2 -c extGVarbar2.c extGVarbar1.c

// This test cannot use pipes because it requires multiple output files

Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/extGVarm1.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//RUN: rm -rf %t*
//RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/extGVarm2.c %S/extGVarm3.c --
//RUN: FileCheck -match-full-lines --input-file %t.checked/extGVarm1.c %s
//RUN: %clang -c %t.checked/extGVarm1.c %t.checked/extGVarm2.c %t.checked/extGVarm3.c
//RUN: %clang -working-directory=%t.checked -c extGVarm1.c extGVarm2.c extGVarm3.c

// This test cannot use pipes because it requires multiple output files

Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/extGVarm2.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//RUN: rm -rf %t*
//RUN: 3c -base-dir=%S -output-dir=%t.checked2 %s %S/extGVarm1.c %S/extGVarm3.c --
//RUN: FileCheck -match-full-lines --input-file %t.checked2/extGVarm2.c %s
//RUN: %clang -c %t.checked2/extGVarm2.c %t.checked2/extGVarm3.c %t.checked2/extGVarm1.c
//RUN: %clang -working-directory=%t.checked2 -c extGVarm2.c extGVarm3.c extGVarm1.c

// This test cannot use pipes because it requires multiple output files

Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/extGVarm3.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//RUN: rm -rf %t*
//RUN: 3c -base-dir=%S -output-dir=%t.checked3 %s %S/extGVarm1.c %S/extGVarm2.c --
//RUN: FileCheck -match-full-lines --input-file %t.checked3/extGVarm3.c %s
//RUN: %clang -c %t.checked3/extGVarm3.c %t.checked3/extGVarm2.c %t.checked3/extGVarm1.c
//RUN: %clang -working-directory=%t.checked3 -c extGVarm3.c extGVarm2.c extGVarm1.c

// This test cannot use pipes because it requires multiple output files

Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/global.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// RUN: rm -rf %t*
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fno-builtin -Xclang -verify -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -fno-builtin -Xclang -verify -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s --
// RUN: 3c -base-dir=%t.checked -addcr %t.checked/global.c -- | diff %t.checked/global.c -
// expected-no-diagnostics
Expand Down
3 changes: 3 additions & 0 deletions clang/test/3C/json_formating.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// RUN: rm -rf %t*
// RUN: mkdir %t.alltypes && cd %t.alltypes
// RUN: 3c -base-dir=%S -alltypes -dump-stats -dump-intermediate -debug-solver %s
// RUN: python -c "import json, glob; [json.load(open(f)) for f in glob.glob('*.json')]"
// RUN: mkdir %t.noalltypes && cd %t.noalltypes
// RUN: 3c -base-dir=%S -dump-stats -dump-intermediate -debug-solver %s
// RUN: python -c "import json, glob; [json.load(open(f)) for f in glob.glob('*.json')]"

Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/multipledecls.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// RUN: rm -rf %t*
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines %s
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S -addcr -output-dir=%t.checked %s --
// RUN: 3c -base-dir=%t.checked -addcr %t.checked/multipledecls.c -- | diff %t.checked/multipledecls.c -
// expected-no-diagnostics
Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/placements.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// RUN: rm -rf %t*
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK","CHECK_NOALL","CHECK-NEXT" %s
// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK","CHECK_ALL","CHECK-NEXT" %s
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S -addcr -alltypes -output-dir=%t.checked %s --
// RUN: 3c -base-dir=%t.checked -addcr -alltypes %t.checked/placements.c -- | diff %t.checked/placements.c -
// expected-no-diagnostics
Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/prototype_success1.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//RUN: rm -rf %t*
//RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/prototype_success2.c --
//RUN: FileCheck -match-full-lines --input-file %t.checked/prototype_success1.c %s
//RUN: %clang -c %t.checked/prototype_success1.c %t.checked/prototype_success2.c
//RUN: %clang -working-directory=%t.checked -c prototype_success1.c prototype_success2.c

/*Note: this file is part of a multi-file regression test in tandem with
prototype_success2.c*/
Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/prototype_success2.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//RUN: rm -rf %t*
//RUN: 3c -base-dir=%S -output-dir=%t.checked2 %s %S/prototype_success1.c --
//RUN: FileCheck -match-full-lines --input-file %t.checked2/prototype_success2.c %s
//RUN: %clang -c %t.checked2/prototype_success1.c %t.checked2/prototype_success2.c
//RUN: %clang -working-directory=%t.checked2 -c prototype_success1.c prototype_success2.c

/*Note: this file is part of a multi-file regression test in tandem with
prototype_success1.c. For comments about the different functions in this file,
Expand Down
4 changes: 2 additions & 2 deletions clang/test/3C/ptrtoconstarr.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// RUN: rm -rf %t*
// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
// RUN: 3c -base-dir=%S --addcr %s -- | %clang -c -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S --addcr --alltypes %s -- | %clang -c -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S --addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S --addcr --alltypes %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s --
// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/ptrtoconstarr.c -- | diff %t.checked/ptrtoconstarr.c -

Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/qualifiers.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: rm -rf %t*
// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checkedALL %s --
// RUN: 3c -base-dir=%S -output-dir=%t.checkedNOALL %s --
// RUN: %clang -c %t.checkedNOALL/qualifiers.c
// RUN: %clang -working-directory=%t.checkedNOALL -c qualifiers.c
// RUN: FileCheck -match-full-lines --input-file %t.checkedNOALL/qualifiers.c %s
// RUN: FileCheck -match-full-lines --input-file %t.checkedALL/qualifiers.c %s

Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/simple_locals.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// RUN: rm -rf %t*
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S -addcr %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S -addcr -alltypes %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s --
// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/simple_locals.c -- | diff %t.checked/simple_locals.c -
Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/some_checked.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Tests for the 3C.
//
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s
// RUN: 3c -base-dir=%S %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -o /dev/null -
// expected-no-diagnostics
//

Expand Down
5 changes: 3 additions & 2 deletions clang/test/3C/statstest.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// RUN: rm -rf %t*
// RUN: 3c -dump-stats -base-dir=%S -alltypes -addcr %s -- 2>%t.stderr | FileCheck -match-full-lines %s
// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_STDERR" --input-file %t.stderr %s
// RUN: mkdir %t && cd %t
// RUN: 3c -dump-stats -base-dir=%S -alltypes -addcr %s -- 2>stderr | FileCheck -match-full-lines %s
// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_STDERR" --input-file %t/stderr %s


#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/struct_init_list.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: rm -rf %t*
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s
// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fno-builtin -Xclang -verify -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S -alltypes %s -- | %clang -c -fno-builtin -Xclang -verify -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S -output-dir=%t.checked -alltypes %s --
// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/struct_init_list.c -- | diff %t.checked/struct_init_list.c -
// expected-no-diagnostics
Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/typedefbounds.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: rm -rf %t*
// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
// RUN: 3c -base-dir=%S --addcr --alltypes %s -- | %clang -c -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S --addcr --alltypes %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s
// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/typedefbounds.c -- | diff %t.checked/typedefbounds.c -

Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/typedefnoptr.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK" %s
//RUN: 3c -base-dir=%S --addcr %s -- | %clang -c -fcheckedc-extension -x c -
//RUN: 3c -base-dir=%S --addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -

typedef unsigned int uint_t;
typedef uint_t *ptr_uint_t;
Expand Down
4 changes: 2 additions & 2 deletions clang/test/3C/typedefs.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// RUN: rm -rf %t*
// RUN: 3c -base-dir=%S -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s
// RUN: 3c -base-dir=%S -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s
// RUN: 3c -base-dir=%S --addcr --alltypes %s -- | %clang -c -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S --addcr %s -- | %clang -c -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S --addcr --alltypes %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S --addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null -
// RUN: 3c -base-dir=%S -alltypes -output-dir=%t.checked %s
// RUN: 3c -base-dir=%t.checked -alltypes %t.checked/typedefs.c -- | diff %t.checked/typedefs.c -

Expand Down
2 changes: 1 addition & 1 deletion clang/test/3C/vargs.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// RUN: 3c -base-dir=%S %s -- | FileCheck -match-full-lines %s
// RUN: 3c -base-dir=%S -alltypes %s -- | FileCheck -match-full-lines %s
// RUN: 3c -base-dir=%S %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -
// RUN: 3c -base-dir=%S %s -- | %clang -c -Xclang -verify -fcheckedc-extension -x c -o /dev/null -
// expected-no-diagnostics
#include <stdarg.h>

Expand Down

0 comments on commit 91db852

Please sign in to comment.