diff --git a/clang/test/3C/3c-regtest-unconvert.py b/clang/test/3C/3c-regtest-unconvert.py new file mode 100755 index 000000000000..5a014535e0fa --- /dev/null +++ b/clang/test/3C/3c-regtest-unconvert.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python +# +# 3c-regtest-unconvert.py can be used to verify that an existing 3C regression +# test with a written-out RUN script has been correctly converted to use +# 3c-regtest.py. +# +# Usage: 3c-regtest-unconvert.py TEST_FILE +# +# This verifies that the TEST_FILE contains a 3c-regtest.py RUN command in +# canonical form and then prints the TEST_FILE with this RUN command replaced by +# the generated RUN script. The output should be identical to the test file +# before conversion to 3c-regtest.py. + +import sys +import re +import argparse + +import script_generator + +parser = argparse.ArgumentParser(description='''\ +Converts a 3C regression test that uses 3c-regtest.py back to one with a +written-out RUN script so you can verify that a test was correctly converted to +use 3c-regtest.py.\ +''') +# TODO: Add help +parser.add_argument('test_file') + +argobj = parser.parse_args() + +with open(argobj.test_file) as f: + lines = f.readlines() + +new_lines = [] +for l in lines: + if '3c-regtest' in l: + m = re.search(r"\A// RUN: %S/3c-regtest\.py (.*) %s -t %t --clang '%clang'\n\Z", l) + if m is None: + sys.exit('Non-canonical 3c-regtest RUN line: %s' % l) # XXX Trailing newline + test_type_flags_joined = m.group(1) + + # FUTURE: Will we need to handle quoting? + test_type_flags = test_type_flags_joined.split(' ') + # XXX: This just exits on error. We'd like to add a more meaningful message, but + # the default Python version on gamera (2.7.18) is too old to support + # exit_on_error=False. + test_type_argobj = script_generator.parser.parse_args(test_type_flags + [argobj.test_file]) + + run_lines = [('// RUN: %s\n' % cmd if cmd != '' else '\n') + for cmd in script_generator.generate_commands(test_type_argobj)] + new_lines.extend(run_lines) + else: + new_lines.append(l) + +sys.stdout.write(''.join(new_lines)) diff --git a/clang/test/3C/3c-regtest-verify-all-conversions.sh b/clang/test/3C/3c-regtest-verify-all-conversions.sh new file mode 100755 index 000000000000..85502d7dfffa --- /dev/null +++ b/clang/test/3C/3c-regtest-verify-all-conversions.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# Usage: ./3c-regtest-verify-all-conversions.sh BASE_TREEISH +# +# BASE_TREEISH has the original versions of the tests to compare to. Typically, +# it would be origin/test-command-refactoring.verify-base . +# +# This takes a little while, so you may want to redirect the output to a file +# and view it later + +set -e +set -o pipefail +base_commit="$1" +git rev-parse "$base_commit^{tree}" &>/dev/null || { echo >&2 'Invalid base tree'; exit 1; } + +for f in $(git grep --files-with-matches '3c-regtest' *.c); do + ./3c-regtest-unconvert.py $f | { + diff --label $f.orig --label $f.unconvert -u <(git show "$base_commit":./$f) - || [ $? == 1 ] + } +done diff --git a/clang/test/3C/3c-regtest.py b/clang/test/3C/3c-regtest.py new file mode 100755 index 000000000000..89e187ee4d9c --- /dev/null +++ b/clang/test/3C/3c-regtest.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python +# +# 3c-regtest.py: Run a 3C regression test using a standard RUN script. +# +# 3c-regtest.py is intended to be invoked by a single RUN command in the test +# file. The canonical form is: +# +# // RUN: %S/3c-regtest.py TEST_TYPE_FLAGS %s -t %t --clang '%clang' +# +# 3c-regtest.py generates a RUN script based on the TEST_TYPE_FLAGS (using +# script_generator.py) and runs it using code from `lit`. +# +# The -t and --clang flags are used to pass substitution values from the outer +# `lit` configuration so that 3c-regtest.py knows what to substitute for +# occurrences of %t and %clang in its script. We'll add flags like this for all +# % codes that appear in the scripts. + +# TODO: Add Windows compatibility code once we have an easy way to test on +# Windows. + +import sys +import os +import platform +import argparse + +import script_generator + +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + + '/../../../llvm/utils/lit') +import lit.TestRunner + +parser = argparse.ArgumentParser(description='Run a 3C regression test.', + parents=[script_generator.parser]) +# Substitution arguments. The test file name is already in +# script_generator.parser. +parser.add_argument('-t') +parser.add_argument('--clang') + +argobj = parser.parse_args() + +test_dir = os.path.dirname(os.path.abspath(argobj.test_file)) + +tmpName = argobj.t +tmpBase = script_generator.remove_suffix(tmpName, '.tmp') +if tmpBase is None: + sys.exit('-t argument %s does not end with .tmp' % tmpName) + +# `lit` supports more substitutions, but these are the only ones needed by the +# tests that use 3c-regtest.py so far. +substitutions = [ + # #_MARKER_# is a hack copied from getDefaultSubstitutions in + # llvm/utils/lit/lit/TestRunner.py. To explain it a bit more fully: + # applySubstitutions processes each before/after pair in turn and replaces + # all occurrences. So if we simply put ('%%', '%') as either the first or + # last pair, there is a risk of a % being interpreted as part of a %s, etc. + # Instead, we temporarily replace %% with a string that doesn't contain % + # and that we assume doesn't occur elsewhere in the commands. The "proper" + # way to implement this kind of substitution processing is to make one pass + # over the input from left to right, replacing codes as they are found, but + # apparently that wasn't worth the extra code in `lit`. + ('%%', '#_MARKER_#'), + ('%s', argobj.test_file), + ('%S', test_dir), + ('%t', tmpName), + ('%clang', argobj.clang), + ('#_MARKER_#', '%') +] + +commands = [cmd for cmd in script_generator.generate_commands(argobj) if cmd != ''] +commands = lit.TestRunner.applySubstitutions(commands, substitutions) + +class FakeTestConfig: + def __init__(self): + self.pipefail = True # Is this always OK? + self.environment = dict(os.environ) + +class FakeTest: + def __init__(self): + self.config = FakeTestConfig() + +class FakeLitConfig: + def __init__(self): + self.isWindows = platform.system() == 'windows' + # Let the calling `lit` handle any timeout. + self.maxIndividualTestTime = 0 + +res = lit.TestRunner.executeScriptInternal( + FakeTest(), FakeLitConfig(), tmpBase, commands, os.getcwd()) +if isinstance(res, lit.Test.Result): + die('Error: executeScriptInternal returned unexpected Result(%s, %r)' % + (res.code.name, res.output)) + +out, err, exitCode, timeoutInfo = res +sys.stdout.write(out) +sys.stderr.write(err) +sys.exit(exitCode) diff --git a/clang/test/3C/3d-allocation.c b/clang/test/3C/3d-allocation.c index 773293e51498..95c3e78f0237 100644 --- a/clang/test/3C/3d-allocation.c +++ b/clang/test/3C/3d-allocation.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/3d-allocation.checked.c -- | count 0 -// RUN: rm %S/3d-allocation.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include #include diff --git a/clang/test/3C/alloc_type_param.c b/clang/test/3C/alloc_type_param.c index d3caa865be00..e77c54c0bdf0 100644 --- a/clang/test/3C/alloc_type_param.c +++ b/clang/test/3C/alloc_type_param.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/alloc_type_param.checked.c -- | count 0 -// RUN: rm %S/alloc_type_param.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/amper.c b/clang/test/3C/amper.c index d823de2d5ac8..4b6c12ce9638 100644 --- a/clang/test/3C/amper.c +++ b/clang/test/3C/amper.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/amper.checked.c -- | count 0 -// RUN: rm %S/amper.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' void foo(int *x) { //CHECK: void foo(int *x : itype(_Ptr)) { diff --git a/clang/test/3C/arrboth.c b/clang/test/3C/arrboth.c index 20d313576ff5..0e9a4658ac6c 100644 --- a/clang/test/3C/arrboth.c +++ b/clang/test/3C/arrboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrboth.checked.c -- | count 0 -// RUN: rm %S/arrboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrbothmulti1.c b/clang/test/3C/arrbothmulti1.c index fad117b784f1..42e9fa2adcd4 100644 --- a/clang/test/3C/arrbothmulti1.c +++ b/clang/test/3C/arrbothmulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrbothmulti2.c -// RUN: %clang -c %S/arrbothmulti1.checkedNOALL.c %S/arrbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrbothmulti1.checked.c %S/arrbothmulti2.checked.c -// RUN: test ! -f %S/arrbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/arrbothmulti2.checked.convert_again.c -// RUN: rm %S/arrbothmulti1.checkedALL.c %S/arrbothmulti2.checkedALL.c -// RUN: rm %S/arrbothmulti1.checkedNOALL.c %S/arrbothmulti2.checkedNOALL.c -// RUN: rm %S/arrbothmulti1.checked.c %S/arrbothmulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrbothmulti2.c b/clang/test/3C/arrbothmulti2.c index 37c8e7549abd..32a4cfb9d177 100644 --- a/clang/test/3C/arrbothmulti2.c +++ b/clang/test/3C/arrbothmulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrbothmulti1.c %s -// RUN: %clang -c %S/arrbothmulti1.checkedNOALL2.c %S/arrbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrbothmulti1.checked2.c %S/arrbothmulti2.checked2.c -// RUN: test ! -f %S/arrbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrbothmulti2.checked2.convert_again.c -// RUN: rm %S/arrbothmulti1.checkedALL2.c %S/arrbothmulti2.checkedALL2.c -// RUN: rm %S/arrbothmulti1.checkedNOALL2.c %S/arrbothmulti2.checkedNOALL2.c -// RUN: rm %S/arrbothmulti1.checked2.c %S/arrbothmulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrcallee.c b/clang/test/3C/arrcallee.c index 2019535ec148..daf263915129 100644 --- a/clang/test/3C/arrcallee.c +++ b/clang/test/3C/arrcallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrcallee.checked.c -- | count 0 -// RUN: rm %S/arrcallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrcalleemulti1.c b/clang/test/3C/arrcalleemulti1.c index e311fecc769a..1a34c476f75e 100644 --- a/clang/test/3C/arrcalleemulti1.c +++ b/clang/test/3C/arrcalleemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrcalleemulti2.c -// RUN: %clang -c %S/arrcalleemulti1.checkedNOALL.c %S/arrcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrcalleemulti1.checked.c %S/arrcalleemulti2.checked.c -// RUN: test ! -f %S/arrcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/arrcalleemulti2.checked.convert_again.c -// RUN: rm %S/arrcalleemulti1.checkedALL.c %S/arrcalleemulti2.checkedALL.c -// RUN: rm %S/arrcalleemulti1.checkedNOALL.c %S/arrcalleemulti2.checkedNOALL.c -// RUN: rm %S/arrcalleemulti1.checked.c %S/arrcalleemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrcalleemulti2.c b/clang/test/3C/arrcalleemulti2.c index 8aa59d7bf1db..2d2afe46d5ba 100644 --- a/clang/test/3C/arrcalleemulti2.c +++ b/clang/test/3C/arrcalleemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrcalleemulti1.c %s -// RUN: %clang -c %S/arrcalleemulti1.checkedNOALL2.c %S/arrcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrcalleemulti1.checked2.c %S/arrcalleemulti2.checked2.c -// RUN: test ! -f %S/arrcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrcalleemulti2.checked2.convert_again.c -// RUN: rm %S/arrcalleemulti1.checkedALL2.c %S/arrcalleemulti2.checkedALL2.c -// RUN: rm %S/arrcalleemulti1.checkedNOALL2.c %S/arrcalleemulti2.checkedNOALL2.c -// RUN: rm %S/arrcalleemulti1.checked2.c %S/arrcalleemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrcaller.c b/clang/test/3C/arrcaller.c index 4fa6a4ef5661..dafadbc0d77c 100644 --- a/clang/test/3C/arrcaller.c +++ b/clang/test/3C/arrcaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrcaller.checked.c -- | count 0 -// RUN: rm %S/arrcaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrcallermulti1.c b/clang/test/3C/arrcallermulti1.c index c12238cfd5c3..a69375ba3cde 100644 --- a/clang/test/3C/arrcallermulti1.c +++ b/clang/test/3C/arrcallermulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrcallermulti2.c -// RUN: %clang -c %S/arrcallermulti1.checkedNOALL.c %S/arrcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrcallermulti1.checked.c %S/arrcallermulti2.checked.c -// RUN: test ! -f %S/arrcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/arrcallermulti2.checked.convert_again.c -// RUN: rm %S/arrcallermulti1.checkedALL.c %S/arrcallermulti2.checkedALL.c -// RUN: rm %S/arrcallermulti1.checkedNOALL.c %S/arrcallermulti2.checkedNOALL.c -// RUN: rm %S/arrcallermulti1.checked.c %S/arrcallermulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrcallermulti2.c b/clang/test/3C/arrcallermulti2.c index 4f1cfc83f242..4523d2b79367 100644 --- a/clang/test/3C/arrcallermulti2.c +++ b/clang/test/3C/arrcallermulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrcallermulti1.c %s -// RUN: %clang -c %S/arrcallermulti1.checkedNOALL2.c %S/arrcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrcallermulti1.checked2.c %S/arrcallermulti2.checked2.c -// RUN: test ! -f %S/arrcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrcallermulti2.checked2.convert_again.c -// RUN: rm %S/arrcallermulti1.checkedALL2.c %S/arrcallermulti2.checkedALL2.c -// RUN: rm %S/arrcallermulti1.checkedNOALL2.c %S/arrcallermulti2.checkedNOALL2.c -// RUN: rm %S/arrcallermulti1.checked2.c %S/arrcallermulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructboth.c b/clang/test/3C/arrinstructboth.c index 1a828236f662..6ee59602e3eb 100644 --- a/clang/test/3C/arrinstructboth.c +++ b/clang/test/3C/arrinstructboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrinstructboth.checked.c -- | count 0 -// RUN: rm %S/arrinstructboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructbothmulti1.c b/clang/test/3C/arrinstructbothmulti1.c index 4e5677055121..f481dc8b98b4 100644 --- a/clang/test/3C/arrinstructbothmulti1.c +++ b/clang/test/3C/arrinstructbothmulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrinstructbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrinstructbothmulti2.c -// RUN: %clang -c %S/arrinstructbothmulti1.checkedNOALL.c %S/arrinstructbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrinstructbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructbothmulti1.checked.c %S/arrinstructbothmulti2.checked.c -// RUN: test ! -f %S/arrinstructbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/arrinstructbothmulti2.checked.convert_again.c -// RUN: rm %S/arrinstructbothmulti1.checkedALL.c %S/arrinstructbothmulti2.checkedALL.c -// RUN: rm %S/arrinstructbothmulti1.checkedNOALL.c %S/arrinstructbothmulti2.checkedNOALL.c -// RUN: rm %S/arrinstructbothmulti1.checked.c %S/arrinstructbothmulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructbothmulti2.c b/clang/test/3C/arrinstructbothmulti2.c index d88d0f56ef17..e33e1a1a0f13 100644 --- a/clang/test/3C/arrinstructbothmulti2.c +++ b/clang/test/3C/arrinstructbothmulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrinstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrinstructbothmulti1.c %s -// RUN: %clang -c %S/arrinstructbothmulti1.checkedNOALL2.c %S/arrinstructbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrinstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructbothmulti1.checked2.c %S/arrinstructbothmulti2.checked2.c -// RUN: test ! -f %S/arrinstructbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrinstructbothmulti2.checked2.convert_again.c -// RUN: rm %S/arrinstructbothmulti1.checkedALL2.c %S/arrinstructbothmulti2.checkedALL2.c -// RUN: rm %S/arrinstructbothmulti1.checkedNOALL2.c %S/arrinstructbothmulti2.checkedNOALL2.c -// RUN: rm %S/arrinstructbothmulti1.checked2.c %S/arrinstructbothmulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructcallee.c b/clang/test/3C/arrinstructcallee.c index 80f86a32d1ba..1350bd5b691c 100644 --- a/clang/test/3C/arrinstructcallee.c +++ b/clang/test/3C/arrinstructcallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrinstructcallee.checked.c -- | count 0 -// RUN: rm %S/arrinstructcallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructcalleemulti1.c b/clang/test/3C/arrinstructcalleemulti1.c index f97b7bd4bf77..2b2e532dd509 100644 --- a/clang/test/3C/arrinstructcalleemulti1.c +++ b/clang/test/3C/arrinstructcalleemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrinstructcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrinstructcalleemulti2.c -// RUN: %clang -c %S/arrinstructcalleemulti1.checkedNOALL.c %S/arrinstructcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrinstructcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructcalleemulti1.checked.c %S/arrinstructcalleemulti2.checked.c -// RUN: test ! -f %S/arrinstructcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/arrinstructcalleemulti2.checked.convert_again.c -// RUN: rm %S/arrinstructcalleemulti1.checkedALL.c %S/arrinstructcalleemulti2.checkedALL.c -// RUN: rm %S/arrinstructcalleemulti1.checkedNOALL.c %S/arrinstructcalleemulti2.checkedNOALL.c -// RUN: rm %S/arrinstructcalleemulti1.checked.c %S/arrinstructcalleemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructcalleemulti2.c b/clang/test/3C/arrinstructcalleemulti2.c index cf47cee67a1d..2c317e83a66c 100644 --- a/clang/test/3C/arrinstructcalleemulti2.c +++ b/clang/test/3C/arrinstructcalleemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrinstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrinstructcalleemulti1.c %s -// RUN: %clang -c %S/arrinstructcalleemulti1.checkedNOALL2.c %S/arrinstructcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrinstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructcalleemulti1.checked2.c %S/arrinstructcalleemulti2.checked2.c -// RUN: test ! -f %S/arrinstructcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrinstructcalleemulti2.checked2.convert_again.c -// RUN: rm %S/arrinstructcalleemulti1.checkedALL2.c %S/arrinstructcalleemulti2.checkedALL2.c -// RUN: rm %S/arrinstructcalleemulti1.checkedNOALL2.c %S/arrinstructcalleemulti2.checkedNOALL2.c -// RUN: rm %S/arrinstructcalleemulti1.checked2.c %S/arrinstructcalleemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructcaller.c b/clang/test/3C/arrinstructcaller.c index 28a686013103..8be7a42b22c7 100644 --- a/clang/test/3C/arrinstructcaller.c +++ b/clang/test/3C/arrinstructcaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrinstructcaller.checked.c -- | count 0 -// RUN: rm %S/arrinstructcaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructcallermulti1.c b/clang/test/3C/arrinstructcallermulti1.c index 8a2fcecc8296..6808c4348770 100644 --- a/clang/test/3C/arrinstructcallermulti1.c +++ b/clang/test/3C/arrinstructcallermulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrinstructcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrinstructcallermulti2.c -// RUN: %clang -c %S/arrinstructcallermulti1.checkedNOALL.c %S/arrinstructcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrinstructcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructcallermulti1.checked.c %S/arrinstructcallermulti2.checked.c -// RUN: test ! -f %S/arrinstructcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/arrinstructcallermulti2.checked.convert_again.c -// RUN: rm %S/arrinstructcallermulti1.checkedALL.c %S/arrinstructcallermulti2.checkedALL.c -// RUN: rm %S/arrinstructcallermulti1.checkedNOALL.c %S/arrinstructcallermulti2.checkedNOALL.c -// RUN: rm %S/arrinstructcallermulti1.checked.c %S/arrinstructcallermulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructcallermulti2.c b/clang/test/3C/arrinstructcallermulti2.c index f38d0d15c4cf..f2c79bcb319a 100644 --- a/clang/test/3C/arrinstructcallermulti2.c +++ b/clang/test/3C/arrinstructcallermulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrinstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrinstructcallermulti1.c %s -// RUN: %clang -c %S/arrinstructcallermulti1.checkedNOALL2.c %S/arrinstructcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrinstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructcallermulti1.checked2.c %S/arrinstructcallermulti2.checked2.c -// RUN: test ! -f %S/arrinstructcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrinstructcallermulti2.checked2.convert_again.c -// RUN: rm %S/arrinstructcallermulti1.checkedALL2.c %S/arrinstructcallermulti2.checkedALL2.c -// RUN: rm %S/arrinstructcallermulti1.checkedNOALL2.c %S/arrinstructcallermulti2.checkedNOALL2.c -// RUN: rm %S/arrinstructcallermulti1.checked2.c %S/arrinstructcallermulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructprotoboth.c b/clang/test/3C/arrinstructprotoboth.c index 5a479a2ba6e8..b9902d3325e5 100644 --- a/clang/test/3C/arrinstructprotoboth.c +++ b/clang/test/3C/arrinstructprotoboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrinstructprotoboth.checked.c -- | count 0 -// RUN: rm %S/arrinstructprotoboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructprotocallee.c b/clang/test/3C/arrinstructprotocallee.c index d722f26dff7e..fb93591930e1 100644 --- a/clang/test/3C/arrinstructprotocallee.c +++ b/clang/test/3C/arrinstructprotocallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrinstructprotocallee.checked.c -- | count 0 -// RUN: rm %S/arrinstructprotocallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructprotocaller.c b/clang/test/3C/arrinstructprotocaller.c index 688799f67e04..4ea55abafab3 100644 --- a/clang/test/3C/arrinstructprotocaller.c +++ b/clang/test/3C/arrinstructprotocaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrinstructprotocaller.checked.c -- | count 0 -// RUN: rm %S/arrinstructprotocaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructprotosafe.c b/clang/test/3C/arrinstructprotosafe.c index ba588864f417..3bcba53ff1d5 100644 --- a/clang/test/3C/arrinstructprotosafe.c +++ b/clang/test/3C/arrinstructprotosafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrinstructprotosafe.checked.c -- | count 0 -// RUN: rm %S/arrinstructprotosafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructsafe.c b/clang/test/3C/arrinstructsafe.c index 35b768aaf6eb..6d5ddf21ca80 100644 --- a/clang/test/3C/arrinstructsafe.c +++ b/clang/test/3C/arrinstructsafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrinstructsafe.checked.c -- | count 0 -// RUN: rm %S/arrinstructsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructsafemulti1.c b/clang/test/3C/arrinstructsafemulti1.c index 87f30ec804a6..327a9fd04fdf 100644 --- a/clang/test/3C/arrinstructsafemulti1.c +++ b/clang/test/3C/arrinstructsafemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrinstructsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrinstructsafemulti2.c -// RUN: %clang -c %S/arrinstructsafemulti1.checkedNOALL.c %S/arrinstructsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrinstructsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructsafemulti1.checked.c %S/arrinstructsafemulti2.checked.c -// RUN: test ! -f %S/arrinstructsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/arrinstructsafemulti2.checked.convert_again.c -// RUN: rm %S/arrinstructsafemulti1.checkedALL.c %S/arrinstructsafemulti2.checkedALL.c -// RUN: rm %S/arrinstructsafemulti1.checkedNOALL.c %S/arrinstructsafemulti2.checkedNOALL.c -// RUN: rm %S/arrinstructsafemulti1.checked.c %S/arrinstructsafemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrinstructsafemulti2.c b/clang/test/3C/arrinstructsafemulti2.c index 4a17a8644262..e4fb62f78366 100644 --- a/clang/test/3C/arrinstructsafemulti2.c +++ b/clang/test/3C/arrinstructsafemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrinstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrinstructsafemulti1.c %s -// RUN: %clang -c %S/arrinstructsafemulti1.checkedNOALL2.c %S/arrinstructsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrinstructsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrinstructsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrinstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrinstructsafemulti1.checked2.c %S/arrinstructsafemulti2.checked2.c -// RUN: test ! -f %S/arrinstructsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrinstructsafemulti2.checked2.convert_again.c -// RUN: rm %S/arrinstructsafemulti1.checkedALL2.c %S/arrinstructsafemulti2.checkedALL2.c -// RUN: rm %S/arrinstructsafemulti1.checkedNOALL2.c %S/arrinstructsafemulti2.checkedNOALL2.c -// RUN: rm %S/arrinstructsafemulti1.checked2.c %S/arrinstructsafemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructboth.c b/clang/test/3C/arrofstructboth.c index b86ddd44f677..684de3e823c0 100644 --- a/clang/test/3C/arrofstructboth.c +++ b/clang/test/3C/arrofstructboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrofstructboth.checked.c -- | count 0 -// RUN: rm %S/arrofstructboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructbothmulti1.c b/clang/test/3C/arrofstructbothmulti1.c index 3d3afe540ce9..754a68c2ec99 100644 --- a/clang/test/3C/arrofstructbothmulti1.c +++ b/clang/test/3C/arrofstructbothmulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrofstructbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrofstructbothmulti2.c -// RUN: %clang -c %S/arrofstructbothmulti1.checkedNOALL.c %S/arrofstructbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrofstructbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrofstructbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrofstructbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrofstructbothmulti1.checked.c %S/arrofstructbothmulti2.checked.c -// RUN: test ! -f %S/arrofstructbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/arrofstructbothmulti2.checked.convert_again.c -// RUN: rm %S/arrofstructbothmulti1.checkedALL.c %S/arrofstructbothmulti2.checkedALL.c -// RUN: rm %S/arrofstructbothmulti1.checkedNOALL.c %S/arrofstructbothmulti2.checkedNOALL.c -// RUN: rm %S/arrofstructbothmulti1.checked.c %S/arrofstructbothmulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructbothmulti2.c b/clang/test/3C/arrofstructbothmulti2.c index 7852433ff0b3..cd09efc13062 100644 --- a/clang/test/3C/arrofstructbothmulti2.c +++ b/clang/test/3C/arrofstructbothmulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrofstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrofstructbothmulti1.c %s -// RUN: %clang -c %S/arrofstructbothmulti1.checkedNOALL2.c %S/arrofstructbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrofstructbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrofstructbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrofstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrofstructbothmulti1.checked2.c %S/arrofstructbothmulti2.checked2.c -// RUN: test ! -f %S/arrofstructbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrofstructbothmulti2.checked2.convert_again.c -// RUN: rm %S/arrofstructbothmulti1.checkedALL2.c %S/arrofstructbothmulti2.checkedALL2.c -// RUN: rm %S/arrofstructbothmulti1.checkedNOALL2.c %S/arrofstructbothmulti2.checkedNOALL2.c -// RUN: rm %S/arrofstructbothmulti1.checked2.c %S/arrofstructbothmulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructcallee.c b/clang/test/3C/arrofstructcallee.c index 68e9512c99c7..073fd7d445cc 100644 --- a/clang/test/3C/arrofstructcallee.c +++ b/clang/test/3C/arrofstructcallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrofstructcallee.checked.c -- | count 0 -// RUN: rm %S/arrofstructcallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructcalleemulti1.c b/clang/test/3C/arrofstructcalleemulti1.c index 4cd731c0dda2..76271c404dc2 100644 --- a/clang/test/3C/arrofstructcalleemulti1.c +++ b/clang/test/3C/arrofstructcalleemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrofstructcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrofstructcalleemulti2.c -// RUN: %clang -c %S/arrofstructcalleemulti1.checkedNOALL.c %S/arrofstructcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrofstructcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrofstructcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrofstructcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrofstructcalleemulti1.checked.c %S/arrofstructcalleemulti2.checked.c -// RUN: test ! -f %S/arrofstructcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/arrofstructcalleemulti2.checked.convert_again.c -// RUN: rm %S/arrofstructcalleemulti1.checkedALL.c %S/arrofstructcalleemulti2.checkedALL.c -// RUN: rm %S/arrofstructcalleemulti1.checkedNOALL.c %S/arrofstructcalleemulti2.checkedNOALL.c -// RUN: rm %S/arrofstructcalleemulti1.checked.c %S/arrofstructcalleemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructcalleemulti2.c b/clang/test/3C/arrofstructcalleemulti2.c index 6aabe0a9a6dc..33830e354980 100644 --- a/clang/test/3C/arrofstructcalleemulti2.c +++ b/clang/test/3C/arrofstructcalleemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrofstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrofstructcalleemulti1.c %s -// RUN: %clang -c %S/arrofstructcalleemulti1.checkedNOALL2.c %S/arrofstructcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrofstructcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrofstructcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrofstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrofstructcalleemulti1.checked2.c %S/arrofstructcalleemulti2.checked2.c -// RUN: test ! -f %S/arrofstructcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrofstructcalleemulti2.checked2.convert_again.c -// RUN: rm %S/arrofstructcalleemulti1.checkedALL2.c %S/arrofstructcalleemulti2.checkedALL2.c -// RUN: rm %S/arrofstructcalleemulti1.checkedNOALL2.c %S/arrofstructcalleemulti2.checkedNOALL2.c -// RUN: rm %S/arrofstructcalleemulti1.checked2.c %S/arrofstructcalleemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructcaller.c b/clang/test/3C/arrofstructcaller.c index da28b00d2eb4..5ff854ecb785 100644 --- a/clang/test/3C/arrofstructcaller.c +++ b/clang/test/3C/arrofstructcaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrofstructcaller.checked.c -- | count 0 -// RUN: rm %S/arrofstructcaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructcallermulti1.c b/clang/test/3C/arrofstructcallermulti1.c index c1d03d01e82e..5b7710cd19f6 100644 --- a/clang/test/3C/arrofstructcallermulti1.c +++ b/clang/test/3C/arrofstructcallermulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrofstructcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrofstructcallermulti2.c -// RUN: %clang -c %S/arrofstructcallermulti1.checkedNOALL.c %S/arrofstructcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrofstructcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrofstructcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrofstructcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrofstructcallermulti1.checked.c %S/arrofstructcallermulti2.checked.c -// RUN: test ! -f %S/arrofstructcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/arrofstructcallermulti2.checked.convert_again.c -// RUN: rm %S/arrofstructcallermulti1.checkedALL.c %S/arrofstructcallermulti2.checkedALL.c -// RUN: rm %S/arrofstructcallermulti1.checkedNOALL.c %S/arrofstructcallermulti2.checkedNOALL.c -// RUN: rm %S/arrofstructcallermulti1.checked.c %S/arrofstructcallermulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructcallermulti2.c b/clang/test/3C/arrofstructcallermulti2.c index 04dcd02bae7a..0ec26e44117a 100644 --- a/clang/test/3C/arrofstructcallermulti2.c +++ b/clang/test/3C/arrofstructcallermulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrofstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrofstructcallermulti1.c %s -// RUN: %clang -c %S/arrofstructcallermulti1.checkedNOALL2.c %S/arrofstructcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrofstructcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrofstructcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrofstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrofstructcallermulti1.checked2.c %S/arrofstructcallermulti2.checked2.c -// RUN: test ! -f %S/arrofstructcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrofstructcallermulti2.checked2.convert_again.c -// RUN: rm %S/arrofstructcallermulti1.checkedALL2.c %S/arrofstructcallermulti2.checkedALL2.c -// RUN: rm %S/arrofstructcallermulti1.checkedNOALL2.c %S/arrofstructcallermulti2.checkedNOALL2.c -// RUN: rm %S/arrofstructcallermulti1.checked2.c %S/arrofstructcallermulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructprotoboth.c b/clang/test/3C/arrofstructprotoboth.c index d4c2e30b2b6e..08a0e3f6f9de 100644 --- a/clang/test/3C/arrofstructprotoboth.c +++ b/clang/test/3C/arrofstructprotoboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrofstructprotoboth.checked.c -- | count 0 -// RUN: rm %S/arrofstructprotoboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructprotocallee.c b/clang/test/3C/arrofstructprotocallee.c index 655a17afa557..1b5a6af600da 100644 --- a/clang/test/3C/arrofstructprotocallee.c +++ b/clang/test/3C/arrofstructprotocallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrofstructprotocallee.checked.c -- | count 0 -// RUN: rm %S/arrofstructprotocallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructprotocaller.c b/clang/test/3C/arrofstructprotocaller.c index 9dc30c48633a..195eb6e166b5 100644 --- a/clang/test/3C/arrofstructprotocaller.c +++ b/clang/test/3C/arrofstructprotocaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrofstructprotocaller.checked.c -- | count 0 -// RUN: rm %S/arrofstructprotocaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructprotosafe.c b/clang/test/3C/arrofstructprotosafe.c index fc2156867ed4..d8e5fe07aa4d 100644 --- a/clang/test/3C/arrofstructprotosafe.c +++ b/clang/test/3C/arrofstructprotosafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrofstructprotosafe.checked.c -- | count 0 -// RUN: rm %S/arrofstructprotosafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructsafe.c b/clang/test/3C/arrofstructsafe.c index bd02df782d1d..c31d075680d0 100644 --- a/clang/test/3C/arrofstructsafe.c +++ b/clang/test/3C/arrofstructsafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrofstructsafe.checked.c -- | count 0 -// RUN: rm %S/arrofstructsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructsafemulti1.c b/clang/test/3C/arrofstructsafemulti1.c index 447df33ee85e..137069edff2c 100644 --- a/clang/test/3C/arrofstructsafemulti1.c +++ b/clang/test/3C/arrofstructsafemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrofstructsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrofstructsafemulti2.c -// RUN: %clang -c %S/arrofstructsafemulti1.checkedNOALL.c %S/arrofstructsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrofstructsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrofstructsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrofstructsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrofstructsafemulti1.checked.c %S/arrofstructsafemulti2.checked.c -// RUN: test ! -f %S/arrofstructsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/arrofstructsafemulti2.checked.convert_again.c -// RUN: rm %S/arrofstructsafemulti1.checkedALL.c %S/arrofstructsafemulti2.checkedALL.c -// RUN: rm %S/arrofstructsafemulti1.checkedNOALL.c %S/arrofstructsafemulti2.checkedNOALL.c -// RUN: rm %S/arrofstructsafemulti1.checked.c %S/arrofstructsafemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrofstructsafemulti2.c b/clang/test/3C/arrofstructsafemulti2.c index 539bc29f255f..2d7825d7ea1d 100644 --- a/clang/test/3C/arrofstructsafemulti2.c +++ b/clang/test/3C/arrofstructsafemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrofstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrofstructsafemulti1.c %s -// RUN: %clang -c %S/arrofstructsafemulti1.checkedNOALL2.c %S/arrofstructsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrofstructsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrofstructsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrofstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrofstructsafemulti1.checked2.c %S/arrofstructsafemulti2.checked2.c -// RUN: test ! -f %S/arrofstructsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrofstructsafemulti2.checked2.convert_again.c -// RUN: rm %S/arrofstructsafemulti1.checkedALL2.c %S/arrofstructsafemulti2.checkedALL2.c -// RUN: rm %S/arrofstructsafemulti1.checkedNOALL2.c %S/arrofstructsafemulti2.checkedNOALL2.c -// RUN: rm %S/arrofstructsafemulti1.checked2.c %S/arrofstructsafemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrprotoboth.c b/clang/test/3C/arrprotoboth.c index 0c0eb974a059..59cdcb128233 100644 --- a/clang/test/3C/arrprotoboth.c +++ b/clang/test/3C/arrprotoboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrprotoboth.checked.c -- | count 0 -// RUN: rm %S/arrprotoboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrprotocallee.c b/clang/test/3C/arrprotocallee.c index bd09b9b911b3..014427565b1e 100644 --- a/clang/test/3C/arrprotocallee.c +++ b/clang/test/3C/arrprotocallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrprotocallee.checked.c -- | count 0 -// RUN: rm %S/arrprotocallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrprotocaller.c b/clang/test/3C/arrprotocaller.c index 32fbf0608b87..8f8c4186d3bb 100644 --- a/clang/test/3C/arrprotocaller.c +++ b/clang/test/3C/arrprotocaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrprotocaller.checked.c -- | count 0 -// RUN: rm %S/arrprotocaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrprotosafe.c b/clang/test/3C/arrprotosafe.c index 23b528dfb749..54955b4487f6 100644 --- a/clang/test/3C/arrprotosafe.c +++ b/clang/test/3C/arrprotosafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrprotosafe.checked.c -- | count 0 -// RUN: rm %S/arrprotosafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrsafe.c b/clang/test/3C/arrsafe.c index 1b906b2b15b2..fc7ae08c6984 100644 --- a/clang/test/3C/arrsafe.c +++ b/clang/test/3C/arrsafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrsafe.checked.c -- | count 0 -// RUN: rm %S/arrsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrsafemulti1.c b/clang/test/3C/arrsafemulti1.c index 36fe19a5d462..97c66cdd00dd 100644 --- a/clang/test/3C/arrsafemulti1.c +++ b/clang/test/3C/arrsafemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrsafemulti2.c -// RUN: %clang -c %S/arrsafemulti1.checkedNOALL.c %S/arrsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrsafemulti1.checked.c %S/arrsafemulti2.checked.c -// RUN: test ! -f %S/arrsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/arrsafemulti2.checked.convert_again.c -// RUN: rm %S/arrsafemulti1.checkedALL.c %S/arrsafemulti2.checkedALL.c -// RUN: rm %S/arrsafemulti1.checkedNOALL.c %S/arrsafemulti2.checkedNOALL.c -// RUN: rm %S/arrsafemulti1.checked.c %S/arrsafemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrsafemulti2.c b/clang/test/3C/arrsafemulti2.c index 1d7ae5938c36..fa32fa9b2d9e 100644 --- a/clang/test/3C/arrsafemulti2.c +++ b/clang/test/3C/arrsafemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrsafemulti1.c %s -// RUN: %clang -c %S/arrsafemulti1.checkedNOALL2.c %S/arrsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrsafemulti1.checked2.c %S/arrsafemulti2.checked2.c -// RUN: test ! -f %S/arrsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrsafemulti2.checked2.convert_again.c -// RUN: rm %S/arrsafemulti1.checkedALL2.c %S/arrsafemulti2.checkedALL2.c -// RUN: rm %S/arrsafemulti1.checkedNOALL2.c %S/arrsafemulti2.checkedNOALL2.c -// RUN: rm %S/arrsafemulti1.checked2.c %S/arrsafemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrstructboth.c b/clang/test/3C/arrstructboth.c index eaba1847c94b..d21461154f68 100644 --- a/clang/test/3C/arrstructboth.c +++ b/clang/test/3C/arrstructboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrstructboth.checked.c -- | count 0 -// RUN: rm %S/arrstructboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrstructbothmulti1.c b/clang/test/3C/arrstructbothmulti1.c index 5b92eb7d1f26..a50777b8fb5e 100644 --- a/clang/test/3C/arrstructbothmulti1.c +++ b/clang/test/3C/arrstructbothmulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrstructbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrstructbothmulti2.c -// RUN: %clang -c %S/arrstructbothmulti1.checkedNOALL.c %S/arrstructbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrstructbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrstructbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrstructbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrstructbothmulti1.checked.c %S/arrstructbothmulti2.checked.c -// RUN: test ! -f %S/arrstructbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/arrstructbothmulti2.checked.convert_again.c -// RUN: rm %S/arrstructbothmulti1.checkedALL.c %S/arrstructbothmulti2.checkedALL.c -// RUN: rm %S/arrstructbothmulti1.checkedNOALL.c %S/arrstructbothmulti2.checkedNOALL.c -// RUN: rm %S/arrstructbothmulti1.checked.c %S/arrstructbothmulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrstructbothmulti2.c b/clang/test/3C/arrstructbothmulti2.c index 8dab1a871caf..a24cc9f0cdd9 100644 --- a/clang/test/3C/arrstructbothmulti2.c +++ b/clang/test/3C/arrstructbothmulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrstructbothmulti1.c %s -// RUN: %clang -c %S/arrstructbothmulti1.checkedNOALL2.c %S/arrstructbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrstructbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrstructbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrstructbothmulti1.checked2.c %S/arrstructbothmulti2.checked2.c -// RUN: test ! -f %S/arrstructbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrstructbothmulti2.checked2.convert_again.c -// RUN: rm %S/arrstructbothmulti1.checkedALL2.c %S/arrstructbothmulti2.checkedALL2.c -// RUN: rm %S/arrstructbothmulti1.checkedNOALL2.c %S/arrstructbothmulti2.checkedNOALL2.c -// RUN: rm %S/arrstructbothmulti1.checked2.c %S/arrstructbothmulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrstructcallee.c b/clang/test/3C/arrstructcallee.c index 83ebae07c1be..de8bef495213 100644 --- a/clang/test/3C/arrstructcallee.c +++ b/clang/test/3C/arrstructcallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrstructcallee.checked.c -- | count 0 -// RUN: rm %S/arrstructcallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrstructcalleemulti1.c b/clang/test/3C/arrstructcalleemulti1.c index 9b56fec1d348..f8a4e18b7b96 100644 --- a/clang/test/3C/arrstructcalleemulti1.c +++ b/clang/test/3C/arrstructcalleemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrstructcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrstructcalleemulti2.c -// RUN: %clang -c %S/arrstructcalleemulti1.checkedNOALL.c %S/arrstructcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrstructcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrstructcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrstructcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrstructcalleemulti1.checked.c %S/arrstructcalleemulti2.checked.c -// RUN: test ! -f %S/arrstructcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/arrstructcalleemulti2.checked.convert_again.c -// RUN: rm %S/arrstructcalleemulti1.checkedALL.c %S/arrstructcalleemulti2.checkedALL.c -// RUN: rm %S/arrstructcalleemulti1.checkedNOALL.c %S/arrstructcalleemulti2.checkedNOALL.c -// RUN: rm %S/arrstructcalleemulti1.checked.c %S/arrstructcalleemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrstructcalleemulti2.c b/clang/test/3C/arrstructcalleemulti2.c index ce8a328d9450..a9fe766500c8 100644 --- a/clang/test/3C/arrstructcalleemulti2.c +++ b/clang/test/3C/arrstructcalleemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrstructcalleemulti1.c %s -// RUN: %clang -c %S/arrstructcalleemulti1.checkedNOALL2.c %S/arrstructcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrstructcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrstructcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrstructcalleemulti1.checked2.c %S/arrstructcalleemulti2.checked2.c -// RUN: test ! -f %S/arrstructcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrstructcalleemulti2.checked2.convert_again.c -// RUN: rm %S/arrstructcalleemulti1.checkedALL2.c %S/arrstructcalleemulti2.checkedALL2.c -// RUN: rm %S/arrstructcalleemulti1.checkedNOALL2.c %S/arrstructcalleemulti2.checkedNOALL2.c -// RUN: rm %S/arrstructcalleemulti1.checked2.c %S/arrstructcalleemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrstructcaller.c b/clang/test/3C/arrstructcaller.c index 4f19adb90864..ffd8706c53c2 100644 --- a/clang/test/3C/arrstructcaller.c +++ b/clang/test/3C/arrstructcaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrstructcaller.checked.c -- | count 0 -// RUN: rm %S/arrstructcaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrstructcallermulti1.c b/clang/test/3C/arrstructcallermulti1.c index 33354c0ad186..4200974d1020 100644 --- a/clang/test/3C/arrstructcallermulti1.c +++ b/clang/test/3C/arrstructcallermulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrstructcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrstructcallermulti2.c -// RUN: %clang -c %S/arrstructcallermulti1.checkedNOALL.c %S/arrstructcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrstructcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrstructcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrstructcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrstructcallermulti1.checked.c %S/arrstructcallermulti2.checked.c -// RUN: test ! -f %S/arrstructcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/arrstructcallermulti2.checked.convert_again.c -// RUN: rm %S/arrstructcallermulti1.checkedALL.c %S/arrstructcallermulti2.checkedALL.c -// RUN: rm %S/arrstructcallermulti1.checkedNOALL.c %S/arrstructcallermulti2.checkedNOALL.c -// RUN: rm %S/arrstructcallermulti1.checked.c %S/arrstructcallermulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrstructcallermulti2.c b/clang/test/3C/arrstructcallermulti2.c index 1762fefc36f0..cec6605cf3b0 100644 --- a/clang/test/3C/arrstructcallermulti2.c +++ b/clang/test/3C/arrstructcallermulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrstructcallermulti1.c %s -// RUN: %clang -c %S/arrstructcallermulti1.checkedNOALL2.c %S/arrstructcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrstructcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrstructcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrstructcallermulti1.checked2.c %S/arrstructcallermulti2.checked2.c -// RUN: test ! -f %S/arrstructcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrstructcallermulti2.checked2.convert_again.c -// RUN: rm %S/arrstructcallermulti1.checkedALL2.c %S/arrstructcallermulti2.checkedALL2.c -// RUN: rm %S/arrstructcallermulti1.checkedNOALL2.c %S/arrstructcallermulti2.checkedNOALL2.c -// RUN: rm %S/arrstructcallermulti1.checked2.c %S/arrstructcallermulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrstructprotoboth.c b/clang/test/3C/arrstructprotoboth.c index 89a034eceabf..59b053859b9e 100644 --- a/clang/test/3C/arrstructprotoboth.c +++ b/clang/test/3C/arrstructprotoboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrstructprotoboth.checked.c -- | count 0 -// RUN: rm %S/arrstructprotoboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrstructprotocallee.c b/clang/test/3C/arrstructprotocallee.c index 09c59405e2d6..a1f38b9e812b 100644 --- a/clang/test/3C/arrstructprotocallee.c +++ b/clang/test/3C/arrstructprotocallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrstructprotocallee.checked.c -- | count 0 -// RUN: rm %S/arrstructprotocallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrstructprotocaller.c b/clang/test/3C/arrstructprotocaller.c index 70b401c8dc9a..f3ce1960a9e5 100644 --- a/clang/test/3C/arrstructprotocaller.c +++ b/clang/test/3C/arrstructprotocaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrstructprotocaller.checked.c -- | count 0 -// RUN: rm %S/arrstructprotocaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrstructprotosafe.c b/clang/test/3C/arrstructprotosafe.c index 63a9e3597c91..d3d3fbf80406 100644 --- a/clang/test/3C/arrstructprotosafe.c +++ b/clang/test/3C/arrstructprotosafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrstructprotosafe.checked.c -- | count 0 -// RUN: rm %S/arrstructprotosafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrstructsafe.c b/clang/test/3C/arrstructsafe.c index 142c9841f4be..64f0f6213735 100644 --- a/clang/test/3C/arrstructsafe.c +++ b/clang/test/3C/arrstructsafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/arrstructsafe.checked.c -- | count 0 -// RUN: rm %S/arrstructsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrstructsafemulti1.c b/clang/test/3C/arrstructsafemulti1.c index 0475219a1c60..5871ca70351e 100644 --- a/clang/test/3C/arrstructsafemulti1.c +++ b/clang/test/3C/arrstructsafemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/arrstructsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/arrstructsafemulti2.c -// RUN: %clang -c %S/arrstructsafemulti1.checkedNOALL.c %S/arrstructsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrstructsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrstructsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/arrstructsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrstructsafemulti1.checked.c %S/arrstructsafemulti2.checked.c -// RUN: test ! -f %S/arrstructsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/arrstructsafemulti2.checked.convert_again.c -// RUN: rm %S/arrstructsafemulti1.checkedALL.c %S/arrstructsafemulti2.checkedALL.c -// RUN: rm %S/arrstructsafemulti1.checkedNOALL.c %S/arrstructsafemulti2.checkedNOALL.c -// RUN: rm %S/arrstructsafemulti1.checked.c %S/arrstructsafemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/arrstructsafemulti2.c b/clang/test/3C/arrstructsafemulti2.c index d7e938c87566..3cdbdee2440e 100644 --- a/clang/test/3C/arrstructsafemulti2.c +++ b/clang/test/3C/arrstructsafemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/arrstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/arrstructsafemulti1.c %s -// RUN: %clang -c %S/arrstructsafemulti1.checkedNOALL2.c %S/arrstructsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/arrstructsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/arrstructsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/arrstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/arrstructsafemulti1.checked2.c %S/arrstructsafemulti2.checked2.c -// RUN: test ! -f %S/arrstructsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/arrstructsafemulti2.checked2.convert_again.c -// RUN: rm %S/arrstructsafemulti1.checkedALL2.c %S/arrstructsafemulti2.checkedALL2.c -// RUN: rm %S/arrstructsafemulti1.checkedNOALL2.c %S/arrstructsafemulti2.checkedNOALL2.c -// RUN: rm %S/arrstructsafemulti1.checked2.c %S/arrstructsafemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/b10_allsafepointerstruct.c b/clang/test/3C/b10_allsafepointerstruct.c index 44b115943260..b22a735b26b5 100644 --- a/clang/test/3C/b10_allsafepointerstruct.c +++ b/clang/test/3C/b10_allsafepointerstruct.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b10_allsafepointerstruct.checked.c -- | count 0 -// RUN: rm %S/b10_allsafepointerstruct.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b11_calleestructnp.c b/clang/test/3C/b11_calleestructnp.c index 5c667a178640..7b993cf7375b 100644 --- a/clang/test/3C/b11_calleestructnp.c +++ b/clang/test/3C/b11_calleestructnp.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b11_calleestructnp.checked.c -- | count 0 -// RUN: rm %S/b11_calleestructnp.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b12_callerstructnp.c b/clang/test/3C/b12_callerstructnp.c index 933b89f7512a..95b9a08ec5c0 100644 --- a/clang/test/3C/b12_callerstructnp.c +++ b/clang/test/3C/b12_callerstructnp.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b12_callerstructnp.checked.c -- | count 0 -// RUN: rm %S/b12_callerstructnp.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b13_calleestructp.c b/clang/test/3C/b13_calleestructp.c index a164619b933e..2ee71754453e 100644 --- a/clang/test/3C/b13_calleestructp.c +++ b/clang/test/3C/b13_calleestructp.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b13_calleestructp.checked.c -- | count 0 -// RUN: rm %S/b13_calleestructp.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/b14_callerstructp.c b/clang/test/3C/b14_callerstructp.c index 0d9c9733e1ca..7c4423155bfc 100644 --- a/clang/test/3C/b14_callerstructp.c +++ b/clang/test/3C/b14_callerstructp.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b14_callerstructp.checked.c -- | count 0 -// RUN: rm %S/b14_callerstructp.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/b15_calleepointerstruct.c b/clang/test/3C/b15_calleepointerstruct.c index 84254e4a5077..f7d8fdb9ecbf 100644 --- a/clang/test/3C/b15_calleepointerstruct.c +++ b/clang/test/3C/b15_calleepointerstruct.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b15_calleepointerstruct.checked.c -- | count 0 -// RUN: rm %S/b15_calleepointerstruct.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b16_callerpointerstruct.c b/clang/test/3C/b16_callerpointerstruct.c index 5df55c6e6023..090ba7a99ade 100644 --- a/clang/test/3C/b16_callerpointerstruct.c +++ b/clang/test/3C/b16_callerpointerstruct.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b16_callerpointerstruct.checked.c -- | count 0 -// RUN: rm %S/b16_callerpointerstruct.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b17_bothstructnp.c b/clang/test/3C/b17_bothstructnp.c index a71f4be39a68..31fdc1407994 100644 --- a/clang/test/3C/b17_bothstructnp.c +++ b/clang/test/3C/b17_bothstructnp.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b17_bothstructnp.checked.c -- | count 0 -// RUN: rm %S/b17_bothstructnp.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b18_bothstructp.c b/clang/test/3C/b18_bothstructp.c index 80bd6c9ef70b..9b745d3b8033 100644 --- a/clang/test/3C/b18_bothstructp.c +++ b/clang/test/3C/b18_bothstructp.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b18_bothstructp.checked.c -- | count 0 -// RUN: rm %S/b18_bothstructp.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/b19_bothpointerstruct.c b/clang/test/3C/b19_bothpointerstruct.c index ee2dad80c9e8..2567224757e9 100644 --- a/clang/test/3C/b19_bothpointerstruct.c +++ b/clang/test/3C/b19_bothpointerstruct.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b19_bothpointerstruct.checked.c -- | count 0 -// RUN: rm %S/b19_bothpointerstruct.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b1_allsafe.c b/clang/test/3C/b1_allsafe.c index 76a33c02dbc5..c1341fd3e159 100644 --- a/clang/test/3C/b1_allsafe.c +++ b/clang/test/3C/b1_allsafe.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b1_allsafe.checked.c -- | count 0 -// RUN: rm %S/b1_allsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b20_allsafepointerstructproto.c b/clang/test/3C/b20_allsafepointerstructproto.c index 6d70f69de5c9..facf5e059d7a 100644 --- a/clang/test/3C/b20_allsafepointerstructproto.c +++ b/clang/test/3C/b20_allsafepointerstructproto.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b20_allsafepointerstructproto.checked.c -- | count 0 -// RUN: rm %S/b20_allsafepointerstructproto.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b21_calleepointerstructproto.c b/clang/test/3C/b21_calleepointerstructproto.c index babbe2af68cc..18435d807c97 100644 --- a/clang/test/3C/b21_calleepointerstructproto.c +++ b/clang/test/3C/b21_calleepointerstructproto.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b21_calleepointerstructproto.checked.c -- | count 0 -// RUN: rm %S/b21_calleepointerstructproto.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b22_callerpointerstructproto.c b/clang/test/3C/b22_callerpointerstructproto.c index ba0e1fa00146..656ab1c6d1f8 100644 --- a/clang/test/3C/b22_callerpointerstructproto.c +++ b/clang/test/3C/b22_callerpointerstructproto.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b22_callerpointerstructproto.checked.c -- | count 0 -// RUN: rm %S/b22_callerpointerstructproto.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b23_explicitunsafecast.c b/clang/test/3C/b23_explicitunsafecast.c index 755a4ef0b4f8..c31334414893 100644 --- a/clang/test/3C/b23_explicitunsafecast.c +++ b/clang/test/3C/b23_explicitunsafecast.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b23_explicitunsafecast.checked.c -- | count 0 -// RUN: rm %S/b23_explicitunsafecast.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b23_retswitchexplicit.c b/clang/test/3C/b23_retswitchexplicit.c index 2b2eb5e77f4a..5b5c0eba8410 100644 --- a/clang/test/3C/b23_retswitchexplicit.c +++ b/clang/test/3C/b23_retswitchexplicit.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b23_retswitchexplicit.checked.c -- | count 0 -// RUN: rm %S/b23_retswitchexplicit.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b24_implicitunsafecast.c b/clang/test/3C/b24_implicitunsafecast.c index baf664ccefd3..bc2a6bf2a932 100644 --- a/clang/test/3C/b24_implicitunsafecast.c +++ b/clang/test/3C/b24_implicitunsafecast.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b24_implicitunsafecast.checked.c -- | count 0 -// RUN: rm %S/b24_implicitunsafecast.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b24_retswitchimplicit.c b/clang/test/3C/b24_retswitchimplicit.c index 2e7aa641fa5e..bd44b308c902 100644 --- a/clang/test/3C/b24_retswitchimplicit.c +++ b/clang/test/3C/b24_retswitchimplicit.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b24_retswitchimplicit.checked.c -- | count 0 -// RUN: rm %S/b24_retswitchimplicit.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b25_castprotosafe.c b/clang/test/3C/b25_castprotosafe.c index bbad01a825d6..d093a3f7c7ee 100644 --- a/clang/test/3C/b25_castprotosafe.c +++ b/clang/test/3C/b25_castprotosafe.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b25_castprotosafe.checked.c -- | count 0 -// RUN: rm %S/b25_castprotosafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b26_castprotounsafe.c b/clang/test/3C/b26_castprotounsafe.c index 179195c9abe8..2ce14f7a91c5 100644 --- a/clang/test/3C/b26_castprotounsafe.c +++ b/clang/test/3C/b26_castprotounsafe.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b26_castprotounsafe.checked.c -- | count 0 -// RUN: rm %S/b26_castprotounsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b26_castprotounsafeimplicit.c b/clang/test/3C/b26_castprotounsafeimplicit.c index 2f3897648268..e3830a88f2de 100644 --- a/clang/test/3C/b26_castprotounsafeimplicit.c +++ b/clang/test/3C/b26_castprotounsafeimplicit.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b26_castprotounsafeimplicit.checked.c -- | count 0 -// RUN: rm %S/b26_castprotounsafeimplicit.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b26_castprotounsafeimplicitretswitch.c b/clang/test/3C/b26_castprotounsafeimplicitretswitch.c index 94407bc7a442..fbbac5c3e4ff 100644 --- a/clang/test/3C/b26_castprotounsafeimplicitretswitch.c +++ b/clang/test/3C/b26_castprotounsafeimplicitretswitch.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b26_castprotounsafeimplicitretswitch.checked.c -- | count 0 -// RUN: rm %S/b26_castprotounsafeimplicitretswitch.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b27_structcastsafe.c b/clang/test/3C/b27_structcastsafe.c index bc105d899d4a..4068e75c15ee 100644 --- a/clang/test/3C/b27_structcastsafe.c +++ b/clang/test/3C/b27_structcastsafe.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b27_structcastsafe.checked.c -- | count 0 -// RUN: rm %S/b27_structcastsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b28_structcastexplicit.c b/clang/test/3C/b28_structcastexplicit.c index 1f04c4c72c68..f41e774aabc4 100644 --- a/clang/test/3C/b28_structcastexplicit.c +++ b/clang/test/3C/b28_structcastexplicit.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b28_structcastexplicit.checked.c -- | count 0 -// RUN: rm %S/b28_structcastexplicit.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b28_structcastimplicit.c b/clang/test/3C/b28_structcastimplicit.c index 59e942d4be01..c35715bf5a23 100644 --- a/clang/test/3C/b28_structcastimplicit.c +++ b/clang/test/3C/b28_structcastimplicit.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b28_structcastimplicit.checked.c -- | count 0 -// RUN: rm %S/b28_structcastimplicit.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b28_structimplicitretcast.c b/clang/test/3C/b28_structimplicitretcast.c index 26ad8facfded..7c1501315986 100644 --- a/clang/test/3C/b28_structimplicitretcast.c +++ b/clang/test/3C/b28_structimplicitretcast.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b28_structimplicitretcast.checked.c -- | count 0 -// RUN: rm %S/b28_structimplicitretcast.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b29_structprotocastsafe.c b/clang/test/3C/b29_structprotocastsafe.c index 9bd93f0e6f16..e04f3312fac2 100644 --- a/clang/test/3C/b29_structprotocastsafe.c +++ b/clang/test/3C/b29_structprotocastsafe.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b29_structprotocastsafe.checked.c -- | count 0 -// RUN: rm %S/b29_structprotocastsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b29_structprotocastsafeuseunsafe.c b/clang/test/3C/b29_structprotocastsafeuseunsafe.c index 09a70c74e742..eb5f83d3a219 100644 --- a/clang/test/3C/b29_structprotocastsafeuseunsafe.c +++ b/clang/test/3C/b29_structprotocastsafeuseunsafe.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b29_structprotocastsafeuseunsafe.checked.c -- | count 0 -// RUN: rm %S/b29_structprotocastsafeuseunsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b2_calleeunsafe.c b/clang/test/3C/b2_calleeunsafe.c index 57058d3d82fe..fdfb85c923bb 100644 --- a/clang/test/3C/b2_calleeunsafe.c +++ b/clang/test/3C/b2_calleeunsafe.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b2_calleeunsafe.checked.c -- | count 0 -// RUN: rm %S/b2_calleeunsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b30_structprotocastexplicitunsafeuseunsafe.c b/clang/test/3C/b30_structprotocastexplicitunsafeuseunsafe.c index c5e9882fcb4f..fa7a8cd702b9 100644 --- a/clang/test/3C/b30_structprotocastexplicitunsafeuseunsafe.c +++ b/clang/test/3C/b30_structprotocastexplicitunsafeuseunsafe.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b30_structprotocastexplicitunsafeuseunsafe.checked.c -- | count 0 -// RUN: rm %S/b30_structprotocastexplicitunsafeuseunsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b30_structprotocastimplicitunsafeuseunsafe.c b/clang/test/3C/b30_structprotocastimplicitunsafeuseunsafe.c index c1e87e8639c2..6d1b5b8af72b 100644 --- a/clang/test/3C/b30_structprotocastimplicitunsafeuseunsafe.c +++ b/clang/test/3C/b30_structprotocastimplicitunsafeuseunsafe.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b30_structprotocastimplicitunsafeuseunsafe.checked.c -- | count 0 -// RUN: rm %S/b30_structprotocastimplicitunsafeuseunsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b30_structprotocastunsafeexplicit.c b/clang/test/3C/b30_structprotocastunsafeexplicit.c index 7a0c0c05e269..2c9d05c03a64 100644 --- a/clang/test/3C/b30_structprotocastunsafeexplicit.c +++ b/clang/test/3C/b30_structprotocastunsafeexplicit.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b30_structprotocastunsafeexplicit.checked.c -- | count 0 -// RUN: rm %S/b30_structprotocastunsafeexplicit.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b30_structprotocastunsafeimplicit.c b/clang/test/3C/b30_structprotocastunsafeimplicit.c index 304944060cc5..6d4041a08abb 100644 --- a/clang/test/3C/b30_structprotocastunsafeimplicit.c +++ b/clang/test/3C/b30_structprotocastunsafeimplicit.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b30_structprotocastunsafeimplicit.checked.c -- | count 0 -// RUN: rm %S/b30_structprotocastunsafeimplicit.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b30_structprotocastunsafeimplicitretswitch.c b/clang/test/3C/b30_structprotocastunsafeimplicitretswitch.c index 77c4984545cd..883188332623 100644 --- a/clang/test/3C/b30_structprotocastunsafeimplicitretswitch.c +++ b/clang/test/3C/b30_structprotocastunsafeimplicitretswitch.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b30_structprotocastunsafeimplicitretswitch.checked.c -- | count 0 -// RUN: rm %S/b30_structprotocastunsafeimplicitretswitch.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b30_structprotoconflict.c b/clang/test/3C/b30_structprotoconflict.c index cd09caec6b12..edc2098b8990 100644 --- a/clang/test/3C/b30_structprotoconflict.c +++ b/clang/test/3C/b30_structprotoconflict.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b30_structprotoconflict.checked.c -- | count 0 -// RUN: rm %S/b30_structprotoconflict.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/b30_structprotoconflictbodyconvert.c b/clang/test/3C/b30_structprotoconflictbodyconvert.c index e6fa81dca2c6..ebf5de841f8b 100644 --- a/clang/test/3C/b30_structprotoconflictbodyconvert.c +++ b/clang/test/3C/b30_structprotoconflictbodyconvert.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b30_structprotoconflictbodyconvert.checked.c -- | count 0 -// RUN: rm %S/b30_structprotoconflictbodyconvert.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/b3_onecallerunsafe.c b/clang/test/3C/b3_onecallerunsafe.c index 86b88be0b42b..2dad70a233d0 100644 --- a/clang/test/3C/b3_onecallerunsafe.c +++ b/clang/test/3C/b3_onecallerunsafe.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b3_onecallerunsafe.checked.c -- | count 0 -// RUN: rm %S/b3_onecallerunsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/b4_bothunsafe.c b/clang/test/3C/b4_bothunsafe.c index 0c91fb3c5e49..96c5ce41bb9c 100644 --- a/clang/test/3C/b4_bothunsafe.c +++ b/clang/test/3C/b4_bothunsafe.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b4_bothunsafe.checked.c -- | count 0 -// RUN: rm %S/b4_bothunsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b5_calleeunsafeproto.c b/clang/test/3C/b5_calleeunsafeproto.c index ca6138a71f84..e0f77d6d6f3d 100644 --- a/clang/test/3C/b5_calleeunsafeproto.c +++ b/clang/test/3C/b5_calleeunsafeproto.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b5_calleeunsafeproto.checked.c -- | count 0 -// RUN: rm %S/b5_calleeunsafeproto.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b6_callerunsafeproto.c b/clang/test/3C/b6_callerunsafeproto.c index 63755f67785b..bf0a4d31423e 100644 --- a/clang/test/3C/b6_callerunsafeproto.c +++ b/clang/test/3C/b6_callerunsafeproto.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b6_callerunsafeproto.checked.c -- | count 0 -// RUN: rm %S/b6_callerunsafeproto.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b7_allsafeproto.c b/clang/test/3C/b7_allsafeproto.c index ea46da5ac6c2..b82182f515a3 100644 --- a/clang/test/3C/b7_allsafeproto.c +++ b/clang/test/3C/b7_allsafeproto.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b7_allsafeproto.checked.c -- | count 0 -// RUN: rm %S/b7_allsafeproto.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b8_allsafestructnp.c b/clang/test/3C/b8_allsafestructnp.c index 10976aac8b38..db61453f1f26 100644 --- a/clang/test/3C/b8_allsafestructnp.c +++ b/clang/test/3C/b8_allsafestructnp.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b8_allsafestructnp.checked.c -- | count 0 -// RUN: rm %S/b8_allsafestructnp.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); extern _Itype_for_any(T) void free(void *pointer : itype(_Array_ptr) byte_count(0)); diff --git a/clang/test/3C/b9_allsafestructp.c b/clang/test/3C/b9_allsafestructp.c index 5e6a13a87df7..c992c46ee357 100644 --- a/clang/test/3C/b9_allsafestructp.c +++ b/clang/test/3C/b9_allsafestructp.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/b9_allsafestructp.checked.c -- | count 0 -// RUN: rm %S/b9_allsafestructp.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/calloc.c b/clang/test/3C/calloc.c index 3811879ac44f..dee353bafbe1 100644 --- a/clang/test/3C/calloc.c +++ b/clang/test/3C/calloc.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/calloc.checked.c -- | count 0 -// RUN: rm %S/calloc.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include diff --git a/clang/test/3C/canonical_type_cast.c b/clang/test/3C/canonical_type_cast.c index 12c0c5085995..fffbed21ae3b 100644 --- a/clang/test/3C/canonical_type_cast.c +++ b/clang/test/3C/canonical_type_cast.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/canonical_type_cast.checked.c -- | count 0 -// RUN: rm %S/canonical_type_cast.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' /* Examples from issue #58 */ diff --git a/clang/test/3C/cast.c b/clang/test/3C/cast.c index 6346e1779c31..05b30e371392 100644 --- a/clang/test/3C/cast.c +++ b/clang/test/3C/cast.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/cast.checked.c -- | count 0 -// RUN: rm %S/cast.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' int foo(int* p) { //CHECK: int foo(_Ptr p) { diff --git a/clang/test/3C/checkedregions.c b/clang/test/3C/checkedregions.c index 72b041e7f1cb..597c868fbb1c 100644 --- a/clang/test/3C/checkedregions.c +++ b/clang/test/3C/checkedregions.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/checkedregions.checked.c -- | count 0 -// RUN: rm %S/checkedregions.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' /* Tests for adding (un)checked regions automatically */ #include diff --git a/clang/test/3C/compound_literal.c b/clang/test/3C/compound_literal.c index 6fa0a97cb293..33a4aa70028c 100644 --- a/clang/test/3C/compound_literal.c +++ b/clang/test/3C/compound_literal.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/compound_literal.checked.c -- | count 0 -// RUN: rm %S/compound_literal.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' struct a { int *a; diff --git a/clang/test/3C/ex1.c b/clang/test/3C/ex1.c index 475544a94777..7a570927d725 100644 --- a/clang/test/3C/ex1.c +++ b/clang/test/3C/ex1.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/ex1.checked.c -- | count 0 -// RUN: rm %S/ex1.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' void foo() { int m = 2; diff --git a/clang/test/3C/extGVar.c b/clang/test/3C/extGVar.c index cf5f2101cc75..1d9cfd624f95 100644 --- a/clang/test/3C/extGVar.c +++ b/clang/test/3C/extGVar.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/extGVar.checked.c -- | count 0 -// RUN: rm %S/extGVar.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' /*what we're interested in*/ extern int *x; diff --git a/clang/test/3C/extstructfields.c b/clang/test/3C/extstructfields.c index 48f6be538ee6..b16fb99bda23 100644 --- a/clang/test/3C/extstructfields.c +++ b/clang/test/3C/extstructfields.c @@ -3,12 +3,7 @@ // reasonable way to write an analogous test that works on Windows. // UNSUPPORTED: system-windows -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/extstructfields.checked.c -- | count 0 -// RUN: rm %S/extstructfields.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include diff --git a/clang/test/3C/fn_sets.c b/clang/test/3C/fn_sets.c index 2d2519339071..9a508214a0c5 100644 --- a/clang/test/3C/fn_sets.c +++ b/clang/test/3C/fn_sets.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/fn_sets.checked.c -- | count 0 -// RUN: rm %S/fn_sets.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' /* Tests relating to issue #86 Handling sets of functions */ /* In the first test case, y WILD due to the (int*)5 assignment. This diff --git a/clang/test/3C/fp.c b/clang/test/3C/fp.c index 42fa08087817..1ebbfe94d28e 100644 --- a/clang/test/3C/fp.c +++ b/clang/test/3C/fp.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/fp.checked.c -- | count 0 -// RUN: rm %S/fp.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' int f(int *p); diff --git a/clang/test/3C/fp_arith.c b/clang/test/3C/fp_arith.c index b6ce9e06da3f..5344348db90b 100644 --- a/clang/test/3C/fp_arith.c +++ b/clang/test/3C/fp_arith.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/fp_arith.checked.c -- | count 0 -// RUN: rm %S/fp_arith.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' /* Tests for the error outlined in issue 74. Pointer arithmetic on function pointers with -alltypes active causes the pointers be ARR pointers, but diff --git a/clang/test/3C/fptrarrboth.c b/clang/test/3C/fptrarrboth.c index e05bd1e33f4e..11e57d4bb617 100644 --- a/clang/test/3C/fptrarrboth.c +++ b/clang/test/3C/fptrarrboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrboth.checked.c -- | count 0 -// RUN: rm %S/fptrarrboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrbothmulti1.c b/clang/test/3C/fptrarrbothmulti1.c index 6400eeceb26f..7ded02668869 100644 --- a/clang/test/3C/fptrarrbothmulti1.c +++ b/clang/test/3C/fptrarrbothmulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrbothmulti2.c -// RUN: %clang -c %S/fptrarrbothmulti1.checkedNOALL.c %S/fptrarrbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrbothmulti1.checked.c %S/fptrarrbothmulti2.checked.c -// RUN: test ! -f %S/fptrarrbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrbothmulti2.checked.convert_again.c -// RUN: rm %S/fptrarrbothmulti1.checkedALL.c %S/fptrarrbothmulti2.checkedALL.c -// RUN: rm %S/fptrarrbothmulti1.checkedNOALL.c %S/fptrarrbothmulti2.checkedNOALL.c -// RUN: rm %S/fptrarrbothmulti1.checked.c %S/fptrarrbothmulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrbothmulti2.c b/clang/test/3C/fptrarrbothmulti2.c index 824b06d3f0a2..cb5690f2722e 100644 --- a/clang/test/3C/fptrarrbothmulti2.c +++ b/clang/test/3C/fptrarrbothmulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrbothmulti1.c %s -// RUN: %clang -c %S/fptrarrbothmulti1.checkedNOALL2.c %S/fptrarrbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrbothmulti1.checked2.c %S/fptrarrbothmulti2.checked2.c -// RUN: test ! -f %S/fptrarrbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrbothmulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrbothmulti1.checkedALL2.c %S/fptrarrbothmulti2.checkedALL2.c -// RUN: rm %S/fptrarrbothmulti1.checkedNOALL2.c %S/fptrarrbothmulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrbothmulti1.checked2.c %S/fptrarrbothmulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrcallee.c b/clang/test/3C/fptrarrcallee.c index 573926cfbe8f..9da081ba87fa 100644 --- a/clang/test/3C/fptrarrcallee.c +++ b/clang/test/3C/fptrarrcallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrcallee.checked.c -- | count 0 -// RUN: rm %S/fptrarrcallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrcalleemulti1.c b/clang/test/3C/fptrarrcalleemulti1.c index e23c1d9ff4c8..f22dbe77551f 100644 --- a/clang/test/3C/fptrarrcalleemulti1.c +++ b/clang/test/3C/fptrarrcalleemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrcalleemulti2.c -// RUN: %clang -c %S/fptrarrcalleemulti1.checkedNOALL.c %S/fptrarrcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrcalleemulti1.checked.c %S/fptrarrcalleemulti2.checked.c -// RUN: test ! -f %S/fptrarrcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrcalleemulti2.checked.convert_again.c -// RUN: rm %S/fptrarrcalleemulti1.checkedALL.c %S/fptrarrcalleemulti2.checkedALL.c -// RUN: rm %S/fptrarrcalleemulti1.checkedNOALL.c %S/fptrarrcalleemulti2.checkedNOALL.c -// RUN: rm %S/fptrarrcalleemulti1.checked.c %S/fptrarrcalleemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrcalleemulti2.c b/clang/test/3C/fptrarrcalleemulti2.c index b2458c79da96..4d2d3cd78d63 100644 --- a/clang/test/3C/fptrarrcalleemulti2.c +++ b/clang/test/3C/fptrarrcalleemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrcalleemulti1.c %s -// RUN: %clang -c %S/fptrarrcalleemulti1.checkedNOALL2.c %S/fptrarrcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrcalleemulti1.checked2.c %S/fptrarrcalleemulti2.checked2.c -// RUN: test ! -f %S/fptrarrcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrcalleemulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrcalleemulti1.checkedALL2.c %S/fptrarrcalleemulti2.checkedALL2.c -// RUN: rm %S/fptrarrcalleemulti1.checkedNOALL2.c %S/fptrarrcalleemulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrcalleemulti1.checked2.c %S/fptrarrcalleemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrcaller.c b/clang/test/3C/fptrarrcaller.c index 57f8e95a8342..b9d307e143dd 100644 --- a/clang/test/3C/fptrarrcaller.c +++ b/clang/test/3C/fptrarrcaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrcaller.checked.c -- | count 0 -// RUN: rm %S/fptrarrcaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrcallermulti1.c b/clang/test/3C/fptrarrcallermulti1.c index 340590a48b96..80f92a7fa79b 100644 --- a/clang/test/3C/fptrarrcallermulti1.c +++ b/clang/test/3C/fptrarrcallermulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrcallermulti2.c -// RUN: %clang -c %S/fptrarrcallermulti1.checkedNOALL.c %S/fptrarrcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrcallermulti1.checked.c %S/fptrarrcallermulti2.checked.c -// RUN: test ! -f %S/fptrarrcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrcallermulti2.checked.convert_again.c -// RUN: rm %S/fptrarrcallermulti1.checkedALL.c %S/fptrarrcallermulti2.checkedALL.c -// RUN: rm %S/fptrarrcallermulti1.checkedNOALL.c %S/fptrarrcallermulti2.checkedNOALL.c -// RUN: rm %S/fptrarrcallermulti1.checked.c %S/fptrarrcallermulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrcallermulti2.c b/clang/test/3C/fptrarrcallermulti2.c index ca0c214ba8c9..3b37b6f506c2 100644 --- a/clang/test/3C/fptrarrcallermulti2.c +++ b/clang/test/3C/fptrarrcallermulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrcallermulti1.c %s -// RUN: %clang -c %S/fptrarrcallermulti1.checkedNOALL2.c %S/fptrarrcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrcallermulti1.checked2.c %S/fptrarrcallermulti2.checked2.c -// RUN: test ! -f %S/fptrarrcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrcallermulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrcallermulti1.checkedALL2.c %S/fptrarrcallermulti2.checkedALL2.c -// RUN: rm %S/fptrarrcallermulti1.checkedNOALL2.c %S/fptrarrcallermulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrcallermulti1.checked2.c %S/fptrarrcallermulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructboth.c b/clang/test/3C/fptrarrinstructboth.c index 2bd61e7e15da..1d076b202038 100644 --- a/clang/test/3C/fptrarrinstructboth.c +++ b/clang/test/3C/fptrarrinstructboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrinstructboth.checked.c -- | count 0 -// RUN: rm %S/fptrarrinstructboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructbothmulti1.c b/clang/test/3C/fptrarrinstructbothmulti1.c index b83e01bbf2b4..8e9f0a0ba3d5 100644 --- a/clang/test/3C/fptrarrinstructbothmulti1.c +++ b/clang/test/3C/fptrarrinstructbothmulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrinstructbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrinstructbothmulti2.c -// RUN: %clang -c %S/fptrarrinstructbothmulti1.checkedNOALL.c %S/fptrarrinstructbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrinstructbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrinstructbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrinstructbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrinstructbothmulti1.checked.c %S/fptrarrinstructbothmulti2.checked.c -// RUN: test ! -f %S/fptrarrinstructbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrinstructbothmulti2.checked.convert_again.c -// RUN: rm %S/fptrarrinstructbothmulti1.checkedALL.c %S/fptrarrinstructbothmulti2.checkedALL.c -// RUN: rm %S/fptrarrinstructbothmulti1.checkedNOALL.c %S/fptrarrinstructbothmulti2.checkedNOALL.c -// RUN: rm %S/fptrarrinstructbothmulti1.checked.c %S/fptrarrinstructbothmulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructbothmulti2.c b/clang/test/3C/fptrarrinstructbothmulti2.c index 5a0cc7e0450d..29fa410c1805 100644 --- a/clang/test/3C/fptrarrinstructbothmulti2.c +++ b/clang/test/3C/fptrarrinstructbothmulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrinstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrinstructbothmulti1.c %s -// RUN: %clang -c %S/fptrarrinstructbothmulti1.checkedNOALL2.c %S/fptrarrinstructbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrinstructbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrinstructbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrinstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrinstructbothmulti1.checked2.c %S/fptrarrinstructbothmulti2.checked2.c -// RUN: test ! -f %S/fptrarrinstructbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrinstructbothmulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrinstructbothmulti1.checkedALL2.c %S/fptrarrinstructbothmulti2.checkedALL2.c -// RUN: rm %S/fptrarrinstructbothmulti1.checkedNOALL2.c %S/fptrarrinstructbothmulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrinstructbothmulti1.checked2.c %S/fptrarrinstructbothmulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructcallee.c b/clang/test/3C/fptrarrinstructcallee.c index 56a4c9a061a2..bb4d7cfed098 100644 --- a/clang/test/3C/fptrarrinstructcallee.c +++ b/clang/test/3C/fptrarrinstructcallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrinstructcallee.checked.c -- | count 0 -// RUN: rm %S/fptrarrinstructcallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructcalleemulti1.c b/clang/test/3C/fptrarrinstructcalleemulti1.c index 898c05aaef55..d38ad8d4f1e3 100644 --- a/clang/test/3C/fptrarrinstructcalleemulti1.c +++ b/clang/test/3C/fptrarrinstructcalleemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrinstructcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrinstructcalleemulti2.c -// RUN: %clang -c %S/fptrarrinstructcalleemulti1.checkedNOALL.c %S/fptrarrinstructcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrinstructcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrinstructcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrinstructcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrinstructcalleemulti1.checked.c %S/fptrarrinstructcalleemulti2.checked.c -// RUN: test ! -f %S/fptrarrinstructcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrinstructcalleemulti2.checked.convert_again.c -// RUN: rm %S/fptrarrinstructcalleemulti1.checkedALL.c %S/fptrarrinstructcalleemulti2.checkedALL.c -// RUN: rm %S/fptrarrinstructcalleemulti1.checkedNOALL.c %S/fptrarrinstructcalleemulti2.checkedNOALL.c -// RUN: rm %S/fptrarrinstructcalleemulti1.checked.c %S/fptrarrinstructcalleemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructcalleemulti2.c b/clang/test/3C/fptrarrinstructcalleemulti2.c index e78e6c1b1d7f..cf1bae4d0e1c 100644 --- a/clang/test/3C/fptrarrinstructcalleemulti2.c +++ b/clang/test/3C/fptrarrinstructcalleemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrinstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrinstructcalleemulti1.c %s -// RUN: %clang -c %S/fptrarrinstructcalleemulti1.checkedNOALL2.c %S/fptrarrinstructcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrinstructcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrinstructcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrinstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrinstructcalleemulti1.checked2.c %S/fptrarrinstructcalleemulti2.checked2.c -// RUN: test ! -f %S/fptrarrinstructcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrinstructcalleemulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrinstructcalleemulti1.checkedALL2.c %S/fptrarrinstructcalleemulti2.checkedALL2.c -// RUN: rm %S/fptrarrinstructcalleemulti1.checkedNOALL2.c %S/fptrarrinstructcalleemulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrinstructcalleemulti1.checked2.c %S/fptrarrinstructcalleemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructcaller.c b/clang/test/3C/fptrarrinstructcaller.c index 628a0c4eef3d..8f8cd93e718f 100644 --- a/clang/test/3C/fptrarrinstructcaller.c +++ b/clang/test/3C/fptrarrinstructcaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrinstructcaller.checked.c -- | count 0 -// RUN: rm %S/fptrarrinstructcaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructcallermulti1.c b/clang/test/3C/fptrarrinstructcallermulti1.c index 3cbe84f6a062..a14272cd2ab1 100644 --- a/clang/test/3C/fptrarrinstructcallermulti1.c +++ b/clang/test/3C/fptrarrinstructcallermulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrinstructcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrinstructcallermulti2.c -// RUN: %clang -c %S/fptrarrinstructcallermulti1.checkedNOALL.c %S/fptrarrinstructcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrinstructcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrinstructcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrinstructcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrinstructcallermulti1.checked.c %S/fptrarrinstructcallermulti2.checked.c -// RUN: test ! -f %S/fptrarrinstructcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrinstructcallermulti2.checked.convert_again.c -// RUN: rm %S/fptrarrinstructcallermulti1.checkedALL.c %S/fptrarrinstructcallermulti2.checkedALL.c -// RUN: rm %S/fptrarrinstructcallermulti1.checkedNOALL.c %S/fptrarrinstructcallermulti2.checkedNOALL.c -// RUN: rm %S/fptrarrinstructcallermulti1.checked.c %S/fptrarrinstructcallermulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructcallermulti2.c b/clang/test/3C/fptrarrinstructcallermulti2.c index 69180923f4c4..376bde08d3b6 100644 --- a/clang/test/3C/fptrarrinstructcallermulti2.c +++ b/clang/test/3C/fptrarrinstructcallermulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrinstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrinstructcallermulti1.c %s -// RUN: %clang -c %S/fptrarrinstructcallermulti1.checkedNOALL2.c %S/fptrarrinstructcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrinstructcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrinstructcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrinstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrinstructcallermulti1.checked2.c %S/fptrarrinstructcallermulti2.checked2.c -// RUN: test ! -f %S/fptrarrinstructcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrinstructcallermulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrinstructcallermulti1.checkedALL2.c %S/fptrarrinstructcallermulti2.checkedALL2.c -// RUN: rm %S/fptrarrinstructcallermulti1.checkedNOALL2.c %S/fptrarrinstructcallermulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrinstructcallermulti1.checked2.c %S/fptrarrinstructcallermulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructprotoboth.c b/clang/test/3C/fptrarrinstructprotoboth.c index 6d18256e6459..ade9b8b28fe1 100644 --- a/clang/test/3C/fptrarrinstructprotoboth.c +++ b/clang/test/3C/fptrarrinstructprotoboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrinstructprotoboth.checked.c -- | count 0 -// RUN: rm %S/fptrarrinstructprotoboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructprotocallee.c b/clang/test/3C/fptrarrinstructprotocallee.c index a03215190cf1..5b39086b1637 100644 --- a/clang/test/3C/fptrarrinstructprotocallee.c +++ b/clang/test/3C/fptrarrinstructprotocallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrinstructprotocallee.checked.c -- | count 0 -// RUN: rm %S/fptrarrinstructprotocallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructprotocaller.c b/clang/test/3C/fptrarrinstructprotocaller.c index dec51e86f562..c6e8edb328fd 100644 --- a/clang/test/3C/fptrarrinstructprotocaller.c +++ b/clang/test/3C/fptrarrinstructprotocaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrinstructprotocaller.checked.c -- | count 0 -// RUN: rm %S/fptrarrinstructprotocaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructprotosafe.c b/clang/test/3C/fptrarrinstructprotosafe.c index 7f0c1383c1c0..bceca085e0ef 100644 --- a/clang/test/3C/fptrarrinstructprotosafe.c +++ b/clang/test/3C/fptrarrinstructprotosafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrinstructprotosafe.checked.c -- | count 0 -// RUN: rm %S/fptrarrinstructprotosafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructsafe.c b/clang/test/3C/fptrarrinstructsafe.c index 93732fc3e79a..f069e36da864 100644 --- a/clang/test/3C/fptrarrinstructsafe.c +++ b/clang/test/3C/fptrarrinstructsafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrinstructsafe.checked.c -- | count 0 -// RUN: rm %S/fptrarrinstructsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructsafemulti1.c b/clang/test/3C/fptrarrinstructsafemulti1.c index 8cf70b2d8af0..d2e892887fa7 100644 --- a/clang/test/3C/fptrarrinstructsafemulti1.c +++ b/clang/test/3C/fptrarrinstructsafemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrinstructsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrinstructsafemulti2.c -// RUN: %clang -c %S/fptrarrinstructsafemulti1.checkedNOALL.c %S/fptrarrinstructsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrinstructsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrinstructsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrinstructsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrinstructsafemulti1.checked.c %S/fptrarrinstructsafemulti2.checked.c -// RUN: test ! -f %S/fptrarrinstructsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrinstructsafemulti2.checked.convert_again.c -// RUN: rm %S/fptrarrinstructsafemulti1.checkedALL.c %S/fptrarrinstructsafemulti2.checkedALL.c -// RUN: rm %S/fptrarrinstructsafemulti1.checkedNOALL.c %S/fptrarrinstructsafemulti2.checkedNOALL.c -// RUN: rm %S/fptrarrinstructsafemulti1.checked.c %S/fptrarrinstructsafemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrinstructsafemulti2.c b/clang/test/3C/fptrarrinstructsafemulti2.c index 7bb684cb1a89..847a0ee065b3 100644 --- a/clang/test/3C/fptrarrinstructsafemulti2.c +++ b/clang/test/3C/fptrarrinstructsafemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrinstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrinstructsafemulti1.c %s -// RUN: %clang -c %S/fptrarrinstructsafemulti1.checkedNOALL2.c %S/fptrarrinstructsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrinstructsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrinstructsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrinstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrinstructsafemulti1.checked2.c %S/fptrarrinstructsafemulti2.checked2.c -// RUN: test ! -f %S/fptrarrinstructsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrinstructsafemulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrinstructsafemulti1.checkedALL2.c %S/fptrarrinstructsafemulti2.checkedALL2.c -// RUN: rm %S/fptrarrinstructsafemulti1.checkedNOALL2.c %S/fptrarrinstructsafemulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrinstructsafemulti1.checked2.c %S/fptrarrinstructsafemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrprotoboth.c b/clang/test/3C/fptrarrprotoboth.c index 56bc4aaec8ef..21da81b7716b 100644 --- a/clang/test/3C/fptrarrprotoboth.c +++ b/clang/test/3C/fptrarrprotoboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrprotoboth.checked.c -- | count 0 -// RUN: rm %S/fptrarrprotoboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrprotocallee.c b/clang/test/3C/fptrarrprotocallee.c index 30af420789d9..a7374d28baf7 100644 --- a/clang/test/3C/fptrarrprotocallee.c +++ b/clang/test/3C/fptrarrprotocallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrprotocallee.checked.c -- | count 0 -// RUN: rm %S/fptrarrprotocallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrprotocaller.c b/clang/test/3C/fptrarrprotocaller.c index 2d704849ff82..c2fdbe9718de 100644 --- a/clang/test/3C/fptrarrprotocaller.c +++ b/clang/test/3C/fptrarrprotocaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrprotocaller.checked.c -- | count 0 -// RUN: rm %S/fptrarrprotocaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrprotosafe.c b/clang/test/3C/fptrarrprotosafe.c index e2001ac100c8..956c4e0cc2c9 100644 --- a/clang/test/3C/fptrarrprotosafe.c +++ b/clang/test/3C/fptrarrprotosafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrprotosafe.checked.c -- | count 0 -// RUN: rm %S/fptrarrprotosafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrsafe.c b/clang/test/3C/fptrarrsafe.c index fffacc5f99f8..96da6aa03ec9 100644 --- a/clang/test/3C/fptrarrsafe.c +++ b/clang/test/3C/fptrarrsafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrsafe.checked.c -- | count 0 -// RUN: rm %S/fptrarrsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrsafemulti1.c b/clang/test/3C/fptrarrsafemulti1.c index 4ac21062fd6c..33a088257a2f 100644 --- a/clang/test/3C/fptrarrsafemulti1.c +++ b/clang/test/3C/fptrarrsafemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrsafemulti2.c -// RUN: %clang -c %S/fptrarrsafemulti1.checkedNOALL.c %S/fptrarrsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrsafemulti1.checked.c %S/fptrarrsafemulti2.checked.c -// RUN: test ! -f %S/fptrarrsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrsafemulti2.checked.convert_again.c -// RUN: rm %S/fptrarrsafemulti1.checkedALL.c %S/fptrarrsafemulti2.checkedALL.c -// RUN: rm %S/fptrarrsafemulti1.checkedNOALL.c %S/fptrarrsafemulti2.checkedNOALL.c -// RUN: rm %S/fptrarrsafemulti1.checked.c %S/fptrarrsafemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrsafemulti2.c b/clang/test/3C/fptrarrsafemulti2.c index 3f8a63d45581..07e5e9dc21cb 100644 --- a/clang/test/3C/fptrarrsafemulti2.c +++ b/clang/test/3C/fptrarrsafemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrsafemulti1.c %s -// RUN: %clang -c %S/fptrarrsafemulti1.checkedNOALL2.c %S/fptrarrsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrsafemulti1.checked2.c %S/fptrarrsafemulti2.checked2.c -// RUN: test ! -f %S/fptrarrsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrsafemulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrsafemulti1.checkedALL2.c %S/fptrarrsafemulti2.checkedALL2.c -// RUN: rm %S/fptrarrsafemulti1.checkedNOALL2.c %S/fptrarrsafemulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrsafemulti1.checked2.c %S/fptrarrsafemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructboth.c b/clang/test/3C/fptrarrstructboth.c index a665888b30cd..ff5853fe15c0 100644 --- a/clang/test/3C/fptrarrstructboth.c +++ b/clang/test/3C/fptrarrstructboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrstructboth.checked.c -- | count 0 -// RUN: rm %S/fptrarrstructboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructbothmulti1.c b/clang/test/3C/fptrarrstructbothmulti1.c index cba913dc481e..18c6faa0e7c7 100644 --- a/clang/test/3C/fptrarrstructbothmulti1.c +++ b/clang/test/3C/fptrarrstructbothmulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrstructbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrstructbothmulti2.c -// RUN: %clang -c %S/fptrarrstructbothmulti1.checkedNOALL.c %S/fptrarrstructbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrstructbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrstructbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrstructbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrstructbothmulti1.checked.c %S/fptrarrstructbothmulti2.checked.c -// RUN: test ! -f %S/fptrarrstructbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrstructbothmulti2.checked.convert_again.c -// RUN: rm %S/fptrarrstructbothmulti1.checkedALL.c %S/fptrarrstructbothmulti2.checkedALL.c -// RUN: rm %S/fptrarrstructbothmulti1.checkedNOALL.c %S/fptrarrstructbothmulti2.checkedNOALL.c -// RUN: rm %S/fptrarrstructbothmulti1.checked.c %S/fptrarrstructbothmulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructbothmulti2.c b/clang/test/3C/fptrarrstructbothmulti2.c index 0c00010b3903..cf44cf9f774b 100644 --- a/clang/test/3C/fptrarrstructbothmulti2.c +++ b/clang/test/3C/fptrarrstructbothmulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrstructbothmulti1.c %s -// RUN: %clang -c %S/fptrarrstructbothmulti1.checkedNOALL2.c %S/fptrarrstructbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrstructbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrstructbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrstructbothmulti1.checked2.c %S/fptrarrstructbothmulti2.checked2.c -// RUN: test ! -f %S/fptrarrstructbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrstructbothmulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrstructbothmulti1.checkedALL2.c %S/fptrarrstructbothmulti2.checkedALL2.c -// RUN: rm %S/fptrarrstructbothmulti1.checkedNOALL2.c %S/fptrarrstructbothmulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrstructbothmulti1.checked2.c %S/fptrarrstructbothmulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructcallee.c b/clang/test/3C/fptrarrstructcallee.c index 36fe08cf8302..e1368d7a6808 100644 --- a/clang/test/3C/fptrarrstructcallee.c +++ b/clang/test/3C/fptrarrstructcallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrstructcallee.checked.c -- | count 0 -// RUN: rm %S/fptrarrstructcallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructcalleemulti1.c b/clang/test/3C/fptrarrstructcalleemulti1.c index c86d43b32fef..1b3431f8f0f2 100644 --- a/clang/test/3C/fptrarrstructcalleemulti1.c +++ b/clang/test/3C/fptrarrstructcalleemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrstructcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrstructcalleemulti2.c -// RUN: %clang -c %S/fptrarrstructcalleemulti1.checkedNOALL.c %S/fptrarrstructcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrstructcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrstructcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrstructcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrstructcalleemulti1.checked.c %S/fptrarrstructcalleemulti2.checked.c -// RUN: test ! -f %S/fptrarrstructcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrstructcalleemulti2.checked.convert_again.c -// RUN: rm %S/fptrarrstructcalleemulti1.checkedALL.c %S/fptrarrstructcalleemulti2.checkedALL.c -// RUN: rm %S/fptrarrstructcalleemulti1.checkedNOALL.c %S/fptrarrstructcalleemulti2.checkedNOALL.c -// RUN: rm %S/fptrarrstructcalleemulti1.checked.c %S/fptrarrstructcalleemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructcalleemulti2.c b/clang/test/3C/fptrarrstructcalleemulti2.c index 3e6b6556b13d..9950c74f16e0 100644 --- a/clang/test/3C/fptrarrstructcalleemulti2.c +++ b/clang/test/3C/fptrarrstructcalleemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrstructcalleemulti1.c %s -// RUN: %clang -c %S/fptrarrstructcalleemulti1.checkedNOALL2.c %S/fptrarrstructcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrstructcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrstructcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrstructcalleemulti1.checked2.c %S/fptrarrstructcalleemulti2.checked2.c -// RUN: test ! -f %S/fptrarrstructcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrstructcalleemulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrstructcalleemulti1.checkedALL2.c %S/fptrarrstructcalleemulti2.checkedALL2.c -// RUN: rm %S/fptrarrstructcalleemulti1.checkedNOALL2.c %S/fptrarrstructcalleemulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrstructcalleemulti1.checked2.c %S/fptrarrstructcalleemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructcaller.c b/clang/test/3C/fptrarrstructcaller.c index 82b2f46b45b7..bc9d08bf468f 100644 --- a/clang/test/3C/fptrarrstructcaller.c +++ b/clang/test/3C/fptrarrstructcaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrstructcaller.checked.c -- | count 0 -// RUN: rm %S/fptrarrstructcaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructcallermulti1.c b/clang/test/3C/fptrarrstructcallermulti1.c index 913eae91e89f..6e3668cc1df1 100644 --- a/clang/test/3C/fptrarrstructcallermulti1.c +++ b/clang/test/3C/fptrarrstructcallermulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrstructcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrstructcallermulti2.c -// RUN: %clang -c %S/fptrarrstructcallermulti1.checkedNOALL.c %S/fptrarrstructcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrstructcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrstructcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrstructcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrstructcallermulti1.checked.c %S/fptrarrstructcallermulti2.checked.c -// RUN: test ! -f %S/fptrarrstructcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrstructcallermulti2.checked.convert_again.c -// RUN: rm %S/fptrarrstructcallermulti1.checkedALL.c %S/fptrarrstructcallermulti2.checkedALL.c -// RUN: rm %S/fptrarrstructcallermulti1.checkedNOALL.c %S/fptrarrstructcallermulti2.checkedNOALL.c -// RUN: rm %S/fptrarrstructcallermulti1.checked.c %S/fptrarrstructcallermulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructcallermulti2.c b/clang/test/3C/fptrarrstructcallermulti2.c index 97ee5fc9cf48..492b7e493689 100644 --- a/clang/test/3C/fptrarrstructcallermulti2.c +++ b/clang/test/3C/fptrarrstructcallermulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrstructcallermulti1.c %s -// RUN: %clang -c %S/fptrarrstructcallermulti1.checkedNOALL2.c %S/fptrarrstructcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrstructcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrstructcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrstructcallermulti1.checked2.c %S/fptrarrstructcallermulti2.checked2.c -// RUN: test ! -f %S/fptrarrstructcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrstructcallermulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrstructcallermulti1.checkedALL2.c %S/fptrarrstructcallermulti2.checkedALL2.c -// RUN: rm %S/fptrarrstructcallermulti1.checkedNOALL2.c %S/fptrarrstructcallermulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrstructcallermulti1.checked2.c %S/fptrarrstructcallermulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructprotoboth.c b/clang/test/3C/fptrarrstructprotoboth.c index 0b96e8fbe9f7..66e740e79a40 100644 --- a/clang/test/3C/fptrarrstructprotoboth.c +++ b/clang/test/3C/fptrarrstructprotoboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrstructprotoboth.checked.c -- | count 0 -// RUN: rm %S/fptrarrstructprotoboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructprotocallee.c b/clang/test/3C/fptrarrstructprotocallee.c index 91793ea1ac35..9bc9dfaea7f5 100644 --- a/clang/test/3C/fptrarrstructprotocallee.c +++ b/clang/test/3C/fptrarrstructprotocallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrstructprotocallee.checked.c -- | count 0 -// RUN: rm %S/fptrarrstructprotocallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructprotocaller.c b/clang/test/3C/fptrarrstructprotocaller.c index 75fc8e48da5b..6b3355049262 100644 --- a/clang/test/3C/fptrarrstructprotocaller.c +++ b/clang/test/3C/fptrarrstructprotocaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrstructprotocaller.checked.c -- | count 0 -// RUN: rm %S/fptrarrstructprotocaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructprotosafe.c b/clang/test/3C/fptrarrstructprotosafe.c index 3d87c4bfca3b..2f6fecdb6b3e 100644 --- a/clang/test/3C/fptrarrstructprotosafe.c +++ b/clang/test/3C/fptrarrstructprotosafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrstructprotosafe.checked.c -- | count 0 -// RUN: rm %S/fptrarrstructprotosafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructsafe.c b/clang/test/3C/fptrarrstructsafe.c index 36b743309416..b854d8c24173 100644 --- a/clang/test/3C/fptrarrstructsafe.c +++ b/clang/test/3C/fptrarrstructsafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrarrstructsafe.checked.c -- | count 0 -// RUN: rm %S/fptrarrstructsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructsafemulti1.c b/clang/test/3C/fptrarrstructsafemulti1.c index a931294669f3..650d9e953cac 100644 --- a/clang/test/3C/fptrarrstructsafemulti1.c +++ b/clang/test/3C/fptrarrstructsafemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrarrstructsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrarrstructsafemulti2.c -// RUN: %clang -c %S/fptrarrstructsafemulti1.checkedNOALL.c %S/fptrarrstructsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrstructsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrstructsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrarrstructsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrstructsafemulti1.checked.c %S/fptrarrstructsafemulti2.checked.c -// RUN: test ! -f %S/fptrarrstructsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrarrstructsafemulti2.checked.convert_again.c -// RUN: rm %S/fptrarrstructsafemulti1.checkedALL.c %S/fptrarrstructsafemulti2.checkedALL.c -// RUN: rm %S/fptrarrstructsafemulti1.checkedNOALL.c %S/fptrarrstructsafemulti2.checkedNOALL.c -// RUN: rm %S/fptrarrstructsafemulti1.checked.c %S/fptrarrstructsafemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrarrstructsafemulti2.c b/clang/test/3C/fptrarrstructsafemulti2.c index 4da80e114872..b79a5e7be003 100644 --- a/clang/test/3C/fptrarrstructsafemulti2.c +++ b/clang/test/3C/fptrarrstructsafemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrarrstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrarrstructsafemulti1.c %s -// RUN: %clang -c %S/fptrarrstructsafemulti1.checkedNOALL2.c %S/fptrarrstructsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrarrstructsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrarrstructsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrarrstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrarrstructsafemulti1.checked2.c %S/fptrarrstructsafemulti2.checked2.c -// RUN: test ! -f %S/fptrarrstructsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrarrstructsafemulti2.checked2.convert_again.c -// RUN: rm %S/fptrarrstructsafemulti1.checkedALL2.c %S/fptrarrstructsafemulti2.checkedALL2.c -// RUN: rm %S/fptrarrstructsafemulti1.checkedNOALL2.c %S/fptrarrstructsafemulti2.checkedNOALL2.c -// RUN: rm %S/fptrarrstructsafemulti1.checked2.c %S/fptrarrstructsafemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructboth.c b/clang/test/3C/fptrinstructboth.c index 4ac3446fa99b..461cc48f02f7 100644 --- a/clang/test/3C/fptrinstructboth.c +++ b/clang/test/3C/fptrinstructboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrinstructboth.checked.c -- | count 0 -// RUN: rm %S/fptrinstructboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructbothmulti1.c b/clang/test/3C/fptrinstructbothmulti1.c index db46419b9da3..270ab3c9502d 100644 --- a/clang/test/3C/fptrinstructbothmulti1.c +++ b/clang/test/3C/fptrinstructbothmulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrinstructbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrinstructbothmulti2.c -// RUN: %clang -c %S/fptrinstructbothmulti1.checkedNOALL.c %S/fptrinstructbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrinstructbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrinstructbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrinstructbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrinstructbothmulti1.checked.c %S/fptrinstructbothmulti2.checked.c -// RUN: test ! -f %S/fptrinstructbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrinstructbothmulti2.checked.convert_again.c -// RUN: rm %S/fptrinstructbothmulti1.checkedALL.c %S/fptrinstructbothmulti2.checkedALL.c -// RUN: rm %S/fptrinstructbothmulti1.checkedNOALL.c %S/fptrinstructbothmulti2.checkedNOALL.c -// RUN: rm %S/fptrinstructbothmulti1.checked.c %S/fptrinstructbothmulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructbothmulti2.c b/clang/test/3C/fptrinstructbothmulti2.c index d2ae730701d9..94102a7ef8f1 100644 --- a/clang/test/3C/fptrinstructbothmulti2.c +++ b/clang/test/3C/fptrinstructbothmulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrinstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrinstructbothmulti1.c %s -// RUN: %clang -c %S/fptrinstructbothmulti1.checkedNOALL2.c %S/fptrinstructbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrinstructbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrinstructbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrinstructbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrinstructbothmulti1.checked2.c %S/fptrinstructbothmulti2.checked2.c -// RUN: test ! -f %S/fptrinstructbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrinstructbothmulti2.checked2.convert_again.c -// RUN: rm %S/fptrinstructbothmulti1.checkedALL2.c %S/fptrinstructbothmulti2.checkedALL2.c -// RUN: rm %S/fptrinstructbothmulti1.checkedNOALL2.c %S/fptrinstructbothmulti2.checkedNOALL2.c -// RUN: rm %S/fptrinstructbothmulti1.checked2.c %S/fptrinstructbothmulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructcallee.c b/clang/test/3C/fptrinstructcallee.c index 43b3e312e57d..9b18ee0aadc5 100644 --- a/clang/test/3C/fptrinstructcallee.c +++ b/clang/test/3C/fptrinstructcallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrinstructcallee.checked.c -- | count 0 -// RUN: rm %S/fptrinstructcallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructcalleemulti1.c b/clang/test/3C/fptrinstructcalleemulti1.c index 040af35e1f46..d1c6871240ba 100644 --- a/clang/test/3C/fptrinstructcalleemulti1.c +++ b/clang/test/3C/fptrinstructcalleemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrinstructcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrinstructcalleemulti2.c -// RUN: %clang -c %S/fptrinstructcalleemulti1.checkedNOALL.c %S/fptrinstructcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrinstructcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrinstructcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrinstructcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrinstructcalleemulti1.checked.c %S/fptrinstructcalleemulti2.checked.c -// RUN: test ! -f %S/fptrinstructcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrinstructcalleemulti2.checked.convert_again.c -// RUN: rm %S/fptrinstructcalleemulti1.checkedALL.c %S/fptrinstructcalleemulti2.checkedALL.c -// RUN: rm %S/fptrinstructcalleemulti1.checkedNOALL.c %S/fptrinstructcalleemulti2.checkedNOALL.c -// RUN: rm %S/fptrinstructcalleemulti1.checked.c %S/fptrinstructcalleemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructcalleemulti2.c b/clang/test/3C/fptrinstructcalleemulti2.c index c4c63d541841..2ebaee875c29 100644 --- a/clang/test/3C/fptrinstructcalleemulti2.c +++ b/clang/test/3C/fptrinstructcalleemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrinstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrinstructcalleemulti1.c %s -// RUN: %clang -c %S/fptrinstructcalleemulti1.checkedNOALL2.c %S/fptrinstructcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrinstructcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrinstructcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrinstructcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrinstructcalleemulti1.checked2.c %S/fptrinstructcalleemulti2.checked2.c -// RUN: test ! -f %S/fptrinstructcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrinstructcalleemulti2.checked2.convert_again.c -// RUN: rm %S/fptrinstructcalleemulti1.checkedALL2.c %S/fptrinstructcalleemulti2.checkedALL2.c -// RUN: rm %S/fptrinstructcalleemulti1.checkedNOALL2.c %S/fptrinstructcalleemulti2.checkedNOALL2.c -// RUN: rm %S/fptrinstructcalleemulti1.checked2.c %S/fptrinstructcalleemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructcaller.c b/clang/test/3C/fptrinstructcaller.c index db0a2e392ab6..ade34bcbc0d5 100644 --- a/clang/test/3C/fptrinstructcaller.c +++ b/clang/test/3C/fptrinstructcaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrinstructcaller.checked.c -- | count 0 -// RUN: rm %S/fptrinstructcaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructcallermulti1.c b/clang/test/3C/fptrinstructcallermulti1.c index 26ac4c90c340..8ff929685afb 100644 --- a/clang/test/3C/fptrinstructcallermulti1.c +++ b/clang/test/3C/fptrinstructcallermulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrinstructcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrinstructcallermulti2.c -// RUN: %clang -c %S/fptrinstructcallermulti1.checkedNOALL.c %S/fptrinstructcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrinstructcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrinstructcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrinstructcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrinstructcallermulti1.checked.c %S/fptrinstructcallermulti2.checked.c -// RUN: test ! -f %S/fptrinstructcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrinstructcallermulti2.checked.convert_again.c -// RUN: rm %S/fptrinstructcallermulti1.checkedALL.c %S/fptrinstructcallermulti2.checkedALL.c -// RUN: rm %S/fptrinstructcallermulti1.checkedNOALL.c %S/fptrinstructcallermulti2.checkedNOALL.c -// RUN: rm %S/fptrinstructcallermulti1.checked.c %S/fptrinstructcallermulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructcallermulti2.c b/clang/test/3C/fptrinstructcallermulti2.c index fe7d76138541..5a1d8a64dcb7 100644 --- a/clang/test/3C/fptrinstructcallermulti2.c +++ b/clang/test/3C/fptrinstructcallermulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrinstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrinstructcallermulti1.c %s -// RUN: %clang -c %S/fptrinstructcallermulti1.checkedNOALL2.c %S/fptrinstructcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrinstructcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrinstructcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrinstructcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrinstructcallermulti1.checked2.c %S/fptrinstructcallermulti2.checked2.c -// RUN: test ! -f %S/fptrinstructcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrinstructcallermulti2.checked2.convert_again.c -// RUN: rm %S/fptrinstructcallermulti1.checkedALL2.c %S/fptrinstructcallermulti2.checkedALL2.c -// RUN: rm %S/fptrinstructcallermulti1.checkedNOALL2.c %S/fptrinstructcallermulti2.checkedNOALL2.c -// RUN: rm %S/fptrinstructcallermulti1.checked2.c %S/fptrinstructcallermulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructprotoboth.c b/clang/test/3C/fptrinstructprotoboth.c index c059ee078df6..919d8da18616 100644 --- a/clang/test/3C/fptrinstructprotoboth.c +++ b/clang/test/3C/fptrinstructprotoboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrinstructprotoboth.checked.c -- | count 0 -// RUN: rm %S/fptrinstructprotoboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructprotocallee.c b/clang/test/3C/fptrinstructprotocallee.c index c54026a90043..8b779e3d615e 100644 --- a/clang/test/3C/fptrinstructprotocallee.c +++ b/clang/test/3C/fptrinstructprotocallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrinstructprotocallee.checked.c -- | count 0 -// RUN: rm %S/fptrinstructprotocallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructprotocaller.c b/clang/test/3C/fptrinstructprotocaller.c index 35fe6506d06c..211522ffdde9 100644 --- a/clang/test/3C/fptrinstructprotocaller.c +++ b/clang/test/3C/fptrinstructprotocaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrinstructprotocaller.checked.c -- | count 0 -// RUN: rm %S/fptrinstructprotocaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructprotosafe.c b/clang/test/3C/fptrinstructprotosafe.c index 7da2a9679379..6b93fa816b9f 100644 --- a/clang/test/3C/fptrinstructprotosafe.c +++ b/clang/test/3C/fptrinstructprotosafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrinstructprotosafe.checked.c -- | count 0 -// RUN: rm %S/fptrinstructprotosafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructsafe.c b/clang/test/3C/fptrinstructsafe.c index 59691a81b5cd..65c76b332536 100644 --- a/clang/test/3C/fptrinstructsafe.c +++ b/clang/test/3C/fptrinstructsafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrinstructsafe.checked.c -- | count 0 -// RUN: rm %S/fptrinstructsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructsafemulti1.c b/clang/test/3C/fptrinstructsafemulti1.c index 7763fd4f380d..67e59dfe27b1 100644 --- a/clang/test/3C/fptrinstructsafemulti1.c +++ b/clang/test/3C/fptrinstructsafemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrinstructsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrinstructsafemulti2.c -// RUN: %clang -c %S/fptrinstructsafemulti1.checkedNOALL.c %S/fptrinstructsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrinstructsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrinstructsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrinstructsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrinstructsafemulti1.checked.c %S/fptrinstructsafemulti2.checked.c -// RUN: test ! -f %S/fptrinstructsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrinstructsafemulti2.checked.convert_again.c -// RUN: rm %S/fptrinstructsafemulti1.checkedALL.c %S/fptrinstructsafemulti2.checkedALL.c -// RUN: rm %S/fptrinstructsafemulti1.checkedNOALL.c %S/fptrinstructsafemulti2.checkedNOALL.c -// RUN: rm %S/fptrinstructsafemulti1.checked.c %S/fptrinstructsafemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrinstructsafemulti2.c b/clang/test/3C/fptrinstructsafemulti2.c index fdc96487cc0a..b56e85aaea00 100644 --- a/clang/test/3C/fptrinstructsafemulti2.c +++ b/clang/test/3C/fptrinstructsafemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrinstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrinstructsafemulti1.c %s -// RUN: %clang -c %S/fptrinstructsafemulti1.checkedNOALL2.c %S/fptrinstructsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrinstructsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrinstructsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrinstructsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrinstructsafemulti1.checked2.c %S/fptrinstructsafemulti2.checked2.c -// RUN: test ! -f %S/fptrinstructsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrinstructsafemulti2.checked2.convert_again.c -// RUN: rm %S/fptrinstructsafemulti1.checkedALL2.c %S/fptrinstructsafemulti2.checkedALL2.c -// RUN: rm %S/fptrinstructsafemulti1.checkedNOALL2.c %S/fptrinstructsafemulti2.checkedNOALL2.c -// RUN: rm %S/fptrinstructsafemulti1.checked2.c %S/fptrinstructsafemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafeboth.c b/clang/test/3C/fptrsafeboth.c index 402fb413f30e..b3afcfd3979b 100644 --- a/clang/test/3C/fptrsafeboth.c +++ b/clang/test/3C/fptrsafeboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrsafeboth.checked.c -- | count 0 -// RUN: rm %S/fptrsafeboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafebothmulti1.c b/clang/test/3C/fptrsafebothmulti1.c index 86eeebb6b8f5..33812ecc0cde 100644 --- a/clang/test/3C/fptrsafebothmulti1.c +++ b/clang/test/3C/fptrsafebothmulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrsafebothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrsafebothmulti2.c -// RUN: %clang -c %S/fptrsafebothmulti1.checkedNOALL.c %S/fptrsafebothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrsafebothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrsafebothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrsafebothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrsafebothmulti1.checked.c %S/fptrsafebothmulti2.checked.c -// RUN: test ! -f %S/fptrsafebothmulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrsafebothmulti2.checked.convert_again.c -// RUN: rm %S/fptrsafebothmulti1.checkedALL.c %S/fptrsafebothmulti2.checkedALL.c -// RUN: rm %S/fptrsafebothmulti1.checkedNOALL.c %S/fptrsafebothmulti2.checkedNOALL.c -// RUN: rm %S/fptrsafebothmulti1.checked.c %S/fptrsafebothmulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafebothmulti2.c b/clang/test/3C/fptrsafebothmulti2.c index 901bd68ac41f..fe590b30c0a1 100644 --- a/clang/test/3C/fptrsafebothmulti2.c +++ b/clang/test/3C/fptrsafebothmulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrsafebothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrsafebothmulti1.c %s -// RUN: %clang -c %S/fptrsafebothmulti1.checkedNOALL2.c %S/fptrsafebothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrsafebothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrsafebothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrsafebothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrsafebothmulti1.checked2.c %S/fptrsafebothmulti2.checked2.c -// RUN: test ! -f %S/fptrsafebothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrsafebothmulti2.checked2.convert_again.c -// RUN: rm %S/fptrsafebothmulti1.checkedALL2.c %S/fptrsafebothmulti2.checkedALL2.c -// RUN: rm %S/fptrsafebothmulti1.checkedNOALL2.c %S/fptrsafebothmulti2.checkedNOALL2.c -// RUN: rm %S/fptrsafebothmulti1.checked2.c %S/fptrsafebothmulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafecallee.c b/clang/test/3C/fptrsafecallee.c index 886dba171d79..c0beb6737805 100644 --- a/clang/test/3C/fptrsafecallee.c +++ b/clang/test/3C/fptrsafecallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrsafecallee.checked.c -- | count 0 -// RUN: rm %S/fptrsafecallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafecalleemulti1.c b/clang/test/3C/fptrsafecalleemulti1.c index d3df47bce3d7..1925a45a5a6c 100644 --- a/clang/test/3C/fptrsafecalleemulti1.c +++ b/clang/test/3C/fptrsafecalleemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrsafecalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrsafecalleemulti2.c -// RUN: %clang -c %S/fptrsafecalleemulti1.checkedNOALL.c %S/fptrsafecalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrsafecalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrsafecalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrsafecalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrsafecalleemulti1.checked.c %S/fptrsafecalleemulti2.checked.c -// RUN: test ! -f %S/fptrsafecalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrsafecalleemulti2.checked.convert_again.c -// RUN: rm %S/fptrsafecalleemulti1.checkedALL.c %S/fptrsafecalleemulti2.checkedALL.c -// RUN: rm %S/fptrsafecalleemulti1.checkedNOALL.c %S/fptrsafecalleemulti2.checkedNOALL.c -// RUN: rm %S/fptrsafecalleemulti1.checked.c %S/fptrsafecalleemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafecalleemulti2.c b/clang/test/3C/fptrsafecalleemulti2.c index 18eb94b11c6b..a82a9f217403 100644 --- a/clang/test/3C/fptrsafecalleemulti2.c +++ b/clang/test/3C/fptrsafecalleemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrsafecalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrsafecalleemulti1.c %s -// RUN: %clang -c %S/fptrsafecalleemulti1.checkedNOALL2.c %S/fptrsafecalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrsafecalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrsafecalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrsafecalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrsafecalleemulti1.checked2.c %S/fptrsafecalleemulti2.checked2.c -// RUN: test ! -f %S/fptrsafecalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrsafecalleemulti2.checked2.convert_again.c -// RUN: rm %S/fptrsafecalleemulti1.checkedALL2.c %S/fptrsafecalleemulti2.checkedALL2.c -// RUN: rm %S/fptrsafecalleemulti1.checkedNOALL2.c %S/fptrsafecalleemulti2.checkedNOALL2.c -// RUN: rm %S/fptrsafecalleemulti1.checked2.c %S/fptrsafecalleemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafecaller.c b/clang/test/3C/fptrsafecaller.c index a260a9e3d731..4bd11d1f24d6 100644 --- a/clang/test/3C/fptrsafecaller.c +++ b/clang/test/3C/fptrsafecaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrsafecaller.checked.c -- | count 0 -// RUN: rm %S/fptrsafecaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafecallermulti1.c b/clang/test/3C/fptrsafecallermulti1.c index d4460cb607a7..be810b256464 100644 --- a/clang/test/3C/fptrsafecallermulti1.c +++ b/clang/test/3C/fptrsafecallermulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrsafecallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrsafecallermulti2.c -// RUN: %clang -c %S/fptrsafecallermulti1.checkedNOALL.c %S/fptrsafecallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrsafecallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrsafecallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrsafecallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrsafecallermulti1.checked.c %S/fptrsafecallermulti2.checked.c -// RUN: test ! -f %S/fptrsafecallermulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrsafecallermulti2.checked.convert_again.c -// RUN: rm %S/fptrsafecallermulti1.checkedALL.c %S/fptrsafecallermulti2.checkedALL.c -// RUN: rm %S/fptrsafecallermulti1.checkedNOALL.c %S/fptrsafecallermulti2.checkedNOALL.c -// RUN: rm %S/fptrsafecallermulti1.checked.c %S/fptrsafecallermulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafecallermulti2.c b/clang/test/3C/fptrsafecallermulti2.c index 185067bfdee0..535f2bc75f8f 100644 --- a/clang/test/3C/fptrsafecallermulti2.c +++ b/clang/test/3C/fptrsafecallermulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrsafecallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrsafecallermulti1.c %s -// RUN: %clang -c %S/fptrsafecallermulti1.checkedNOALL2.c %S/fptrsafecallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrsafecallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrsafecallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrsafecallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrsafecallermulti1.checked2.c %S/fptrsafecallermulti2.checked2.c -// RUN: test ! -f %S/fptrsafecallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrsafecallermulti2.checked2.convert_again.c -// RUN: rm %S/fptrsafecallermulti1.checkedALL2.c %S/fptrsafecallermulti2.checkedALL2.c -// RUN: rm %S/fptrsafecallermulti1.checkedNOALL2.c %S/fptrsafecallermulti2.checkedNOALL2.c -// RUN: rm %S/fptrsafecallermulti1.checked2.c %S/fptrsafecallermulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafeprotoboth.c b/clang/test/3C/fptrsafeprotoboth.c index b214074caafa..712df7cdd3ae 100644 --- a/clang/test/3C/fptrsafeprotoboth.c +++ b/clang/test/3C/fptrsafeprotoboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrsafeprotoboth.checked.c -- | count 0 -// RUN: rm %S/fptrsafeprotoboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafeprotocallee.c b/clang/test/3C/fptrsafeprotocallee.c index 42e36c3601d7..b169e3bd54a2 100644 --- a/clang/test/3C/fptrsafeprotocallee.c +++ b/clang/test/3C/fptrsafeprotocallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrsafeprotocallee.checked.c -- | count 0 -// RUN: rm %S/fptrsafeprotocallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafeprotocaller.c b/clang/test/3C/fptrsafeprotocaller.c index f6a65140cf7e..6b5e3656f1ea 100644 --- a/clang/test/3C/fptrsafeprotocaller.c +++ b/clang/test/3C/fptrsafeprotocaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrsafeprotocaller.checked.c -- | count 0 -// RUN: rm %S/fptrsafeprotocaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafeprotosafe.c b/clang/test/3C/fptrsafeprotosafe.c index 94c6f5aa35f9..adf74a1e71bf 100644 --- a/clang/test/3C/fptrsafeprotosafe.c +++ b/clang/test/3C/fptrsafeprotosafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrsafeprotosafe.checked.c -- | count 0 -// RUN: rm %S/fptrsafeprotosafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafesafe.c b/clang/test/3C/fptrsafesafe.c index d3871f2368e2..043b3e950ec0 100644 --- a/clang/test/3C/fptrsafesafe.c +++ b/clang/test/3C/fptrsafesafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrsafesafe.checked.c -- | count 0 -// RUN: rm %S/fptrsafesafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafesafemulti1.c b/clang/test/3C/fptrsafesafemulti1.c index 2ad05debbc22..9f1274fb2da6 100644 --- a/clang/test/3C/fptrsafesafemulti1.c +++ b/clang/test/3C/fptrsafesafemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrsafesafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrsafesafemulti2.c -// RUN: %clang -c %S/fptrsafesafemulti1.checkedNOALL.c %S/fptrsafesafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrsafesafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrsafesafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrsafesafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrsafesafemulti1.checked.c %S/fptrsafesafemulti2.checked.c -// RUN: test ! -f %S/fptrsafesafemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrsafesafemulti2.checked.convert_again.c -// RUN: rm %S/fptrsafesafemulti1.checkedALL.c %S/fptrsafesafemulti2.checkedALL.c -// RUN: rm %S/fptrsafesafemulti1.checkedNOALL.c %S/fptrsafesafemulti2.checkedNOALL.c -// RUN: rm %S/fptrsafesafemulti1.checked.c %S/fptrsafesafemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrsafesafemulti2.c b/clang/test/3C/fptrsafesafemulti2.c index 6ab5e3578bf8..13e528216da5 100644 --- a/clang/test/3C/fptrsafesafemulti2.c +++ b/clang/test/3C/fptrsafesafemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrsafesafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrsafesafemulti1.c %s -// RUN: %clang -c %S/fptrsafesafemulti1.checkedNOALL2.c %S/fptrsafesafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrsafesafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrsafesafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrsafesafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrsafesafemulti1.checked2.c %S/fptrsafesafemulti2.checked2.c -// RUN: test ! -f %S/fptrsafesafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrsafesafemulti2.checked2.convert_again.c -// RUN: rm %S/fptrsafesafemulti1.checkedALL2.c %S/fptrsafesafemulti2.checkedALL2.c -// RUN: rm %S/fptrsafesafemulti1.checkedNOALL2.c %S/fptrsafesafemulti2.checkedNOALL2.c -// RUN: rm %S/fptrsafesafemulti1.checked2.c %S/fptrsafesafemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafeboth.c b/clang/test/3C/fptrunsafeboth.c index 9e632c58a6c6..a0517a51fa18 100644 --- a/clang/test/3C/fptrunsafeboth.c +++ b/clang/test/3C/fptrunsafeboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrunsafeboth.checked.c -- | count 0 -// RUN: rm %S/fptrunsafeboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafebothmulti1.c b/clang/test/3C/fptrunsafebothmulti1.c index ea34492339b9..f7be0c09a1f7 100644 --- a/clang/test/3C/fptrunsafebothmulti1.c +++ b/clang/test/3C/fptrunsafebothmulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrunsafebothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrunsafebothmulti2.c -// RUN: %clang -c %S/fptrunsafebothmulti1.checkedNOALL.c %S/fptrunsafebothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrunsafebothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrunsafebothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrunsafebothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrunsafebothmulti1.checked.c %S/fptrunsafebothmulti2.checked.c -// RUN: test ! -f %S/fptrunsafebothmulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrunsafebothmulti2.checked.convert_again.c -// RUN: rm %S/fptrunsafebothmulti1.checkedALL.c %S/fptrunsafebothmulti2.checkedALL.c -// RUN: rm %S/fptrunsafebothmulti1.checkedNOALL.c %S/fptrunsafebothmulti2.checkedNOALL.c -// RUN: rm %S/fptrunsafebothmulti1.checked.c %S/fptrunsafebothmulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafebothmulti2.c b/clang/test/3C/fptrunsafebothmulti2.c index 770828b1ccfc..505a82e115dd 100644 --- a/clang/test/3C/fptrunsafebothmulti2.c +++ b/clang/test/3C/fptrunsafebothmulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrunsafebothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrunsafebothmulti1.c %s -// RUN: %clang -c %S/fptrunsafebothmulti1.checkedNOALL2.c %S/fptrunsafebothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrunsafebothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrunsafebothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrunsafebothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrunsafebothmulti1.checked2.c %S/fptrunsafebothmulti2.checked2.c -// RUN: test ! -f %S/fptrunsafebothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrunsafebothmulti2.checked2.convert_again.c -// RUN: rm %S/fptrunsafebothmulti1.checkedALL2.c %S/fptrunsafebothmulti2.checkedALL2.c -// RUN: rm %S/fptrunsafebothmulti1.checkedNOALL2.c %S/fptrunsafebothmulti2.checkedNOALL2.c -// RUN: rm %S/fptrunsafebothmulti1.checked2.c %S/fptrunsafebothmulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafecallee.c b/clang/test/3C/fptrunsafecallee.c index 6c38a237ebef..4283a0083f13 100644 --- a/clang/test/3C/fptrunsafecallee.c +++ b/clang/test/3C/fptrunsafecallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrunsafecallee.checked.c -- | count 0 -// RUN: rm %S/fptrunsafecallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafecalleemulti1.c b/clang/test/3C/fptrunsafecalleemulti1.c index 1b70a6cf069f..2ad8bebf933f 100644 --- a/clang/test/3C/fptrunsafecalleemulti1.c +++ b/clang/test/3C/fptrunsafecalleemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrunsafecalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrunsafecalleemulti2.c -// RUN: %clang -c %S/fptrunsafecalleemulti1.checkedNOALL.c %S/fptrunsafecalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrunsafecalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrunsafecalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrunsafecalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrunsafecalleemulti1.checked.c %S/fptrunsafecalleemulti2.checked.c -// RUN: test ! -f %S/fptrunsafecalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrunsafecalleemulti2.checked.convert_again.c -// RUN: rm %S/fptrunsafecalleemulti1.checkedALL.c %S/fptrunsafecalleemulti2.checkedALL.c -// RUN: rm %S/fptrunsafecalleemulti1.checkedNOALL.c %S/fptrunsafecalleemulti2.checkedNOALL.c -// RUN: rm %S/fptrunsafecalleemulti1.checked.c %S/fptrunsafecalleemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafecalleemulti2.c b/clang/test/3C/fptrunsafecalleemulti2.c index 1359b39c7b75..7cc0d671fc18 100644 --- a/clang/test/3C/fptrunsafecalleemulti2.c +++ b/clang/test/3C/fptrunsafecalleemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrunsafecalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrunsafecalleemulti1.c %s -// RUN: %clang -c %S/fptrunsafecalleemulti1.checkedNOALL2.c %S/fptrunsafecalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrunsafecalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrunsafecalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrunsafecalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrunsafecalleemulti1.checked2.c %S/fptrunsafecalleemulti2.checked2.c -// RUN: test ! -f %S/fptrunsafecalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrunsafecalleemulti2.checked2.convert_again.c -// RUN: rm %S/fptrunsafecalleemulti1.checkedALL2.c %S/fptrunsafecalleemulti2.checkedALL2.c -// RUN: rm %S/fptrunsafecalleemulti1.checkedNOALL2.c %S/fptrunsafecalleemulti2.checkedNOALL2.c -// RUN: rm %S/fptrunsafecalleemulti1.checked2.c %S/fptrunsafecalleemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafecaller.c b/clang/test/3C/fptrunsafecaller.c index e1e19dd55d01..6cc4ff897374 100644 --- a/clang/test/3C/fptrunsafecaller.c +++ b/clang/test/3C/fptrunsafecaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrunsafecaller.checked.c -- | count 0 -// RUN: rm %S/fptrunsafecaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafecallermulti1.c b/clang/test/3C/fptrunsafecallermulti1.c index fa68feb816a2..268ce36c477d 100644 --- a/clang/test/3C/fptrunsafecallermulti1.c +++ b/clang/test/3C/fptrunsafecallermulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrunsafecallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrunsafecallermulti2.c -// RUN: %clang -c %S/fptrunsafecallermulti1.checkedNOALL.c %S/fptrunsafecallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrunsafecallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrunsafecallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrunsafecallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrunsafecallermulti1.checked.c %S/fptrunsafecallermulti2.checked.c -// RUN: test ! -f %S/fptrunsafecallermulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrunsafecallermulti2.checked.convert_again.c -// RUN: rm %S/fptrunsafecallermulti1.checkedALL.c %S/fptrunsafecallermulti2.checkedALL.c -// RUN: rm %S/fptrunsafecallermulti1.checkedNOALL.c %S/fptrunsafecallermulti2.checkedNOALL.c -// RUN: rm %S/fptrunsafecallermulti1.checked.c %S/fptrunsafecallermulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafecallermulti2.c b/clang/test/3C/fptrunsafecallermulti2.c index 6a6fccefd1ba..c4b2de471fb6 100644 --- a/clang/test/3C/fptrunsafecallermulti2.c +++ b/clang/test/3C/fptrunsafecallermulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrunsafecallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrunsafecallermulti1.c %s -// RUN: %clang -c %S/fptrunsafecallermulti1.checkedNOALL2.c %S/fptrunsafecallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrunsafecallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrunsafecallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrunsafecallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrunsafecallermulti1.checked2.c %S/fptrunsafecallermulti2.checked2.c -// RUN: test ! -f %S/fptrunsafecallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrunsafecallermulti2.checked2.convert_again.c -// RUN: rm %S/fptrunsafecallermulti1.checkedALL2.c %S/fptrunsafecallermulti2.checkedALL2.c -// RUN: rm %S/fptrunsafecallermulti1.checkedNOALL2.c %S/fptrunsafecallermulti2.checkedNOALL2.c -// RUN: rm %S/fptrunsafecallermulti1.checked2.c %S/fptrunsafecallermulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafeprotoboth.c b/clang/test/3C/fptrunsafeprotoboth.c index e06cfde8b12c..59dd49ffbef2 100644 --- a/clang/test/3C/fptrunsafeprotoboth.c +++ b/clang/test/3C/fptrunsafeprotoboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrunsafeprotoboth.checked.c -- | count 0 -// RUN: rm %S/fptrunsafeprotoboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafeprotocallee.c b/clang/test/3C/fptrunsafeprotocallee.c index 4b59f103d0f8..8001f2780c60 100644 --- a/clang/test/3C/fptrunsafeprotocallee.c +++ b/clang/test/3C/fptrunsafeprotocallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrunsafeprotocallee.checked.c -- | count 0 -// RUN: rm %S/fptrunsafeprotocallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafeprotocaller.c b/clang/test/3C/fptrunsafeprotocaller.c index 3d528326a58c..0c304bb7f983 100644 --- a/clang/test/3C/fptrunsafeprotocaller.c +++ b/clang/test/3C/fptrunsafeprotocaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrunsafeprotocaller.checked.c -- | count 0 -// RUN: rm %S/fptrunsafeprotocaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafeprotosafe.c b/clang/test/3C/fptrunsafeprotosafe.c index d7d0252d1f24..9f55b0a98fe4 100644 --- a/clang/test/3C/fptrunsafeprotosafe.c +++ b/clang/test/3C/fptrunsafeprotosafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrunsafeprotosafe.checked.c -- | count 0 -// RUN: rm %S/fptrunsafeprotosafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafesafe.c b/clang/test/3C/fptrunsafesafe.c index 137f36ed12ac..7705b7ac0c25 100644 --- a/clang/test/3C/fptrunsafesafe.c +++ b/clang/test/3C/fptrunsafesafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/fptrunsafesafe.checked.c -- | count 0 -// RUN: rm %S/fptrunsafesafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafesafemulti1.c b/clang/test/3C/fptrunsafesafemulti1.c index 83974814f3c3..635d45b627c7 100644 --- a/clang/test/3C/fptrunsafesafemulti1.c +++ b/clang/test/3C/fptrunsafesafemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/fptrunsafesafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/fptrunsafesafemulti2.c -// RUN: %clang -c %S/fptrunsafesafemulti1.checkedNOALL.c %S/fptrunsafesafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrunsafesafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrunsafesafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/fptrunsafesafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrunsafesafemulti1.checked.c %S/fptrunsafesafemulti2.checked.c -// RUN: test ! -f %S/fptrunsafesafemulti1.checked.convert_again.c -// RUN: test ! -f %S/fptrunsafesafemulti2.checked.convert_again.c -// RUN: rm %S/fptrunsafesafemulti1.checkedALL.c %S/fptrunsafesafemulti2.checkedALL.c -// RUN: rm %S/fptrunsafesafemulti1.checkedNOALL.c %S/fptrunsafesafemulti2.checkedNOALL.c -// RUN: rm %S/fptrunsafesafemulti1.checked.c %S/fptrunsafesafemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/fptrunsafesafemulti2.c b/clang/test/3C/fptrunsafesafemulti2.c index e4d03a249c57..ba91e8f6f4ea 100644 --- a/clang/test/3C/fptrunsafesafemulti2.c +++ b/clang/test/3C/fptrunsafesafemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/fptrunsafesafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/fptrunsafesafemulti1.c %s -// RUN: %clang -c %S/fptrunsafesafemulti1.checkedNOALL2.c %S/fptrunsafesafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/fptrunsafesafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/fptrunsafesafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/fptrunsafesafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/fptrunsafesafemulti1.checked2.c %S/fptrunsafesafemulti2.checked2.c -// RUN: test ! -f %S/fptrunsafesafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/fptrunsafesafemulti2.checked2.convert_again.c -// RUN: rm %S/fptrunsafesafemulti1.checkedALL2.c %S/fptrunsafesafemulti2.checkedALL2.c -// RUN: rm %S/fptrunsafesafemulti1.checkedNOALL2.c %S/fptrunsafesafemulti2.checkedNOALL2.c -// RUN: rm %S/fptrunsafesafemulti1.checked2.c %S/fptrunsafesafemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/funcptr1.c b/clang/test/3C/funcptr1.c index fc4714b28851..205a8a1a4bed 100644 --- a/clang/test/3C/funcptr1.c +++ b/clang/test/3C/funcptr1.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/funcptr1.checked.c -- | count 0 -// RUN: rm %S/funcptr1.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' void f(int *(*fp)(int *)) { //CHECK: void f(_Ptr<_Ptr (int * : itype(_Ptr))> fp) { diff --git a/clang/test/3C/funcptr2.c b/clang/test/3C/funcptr2.c index 26b5cf3ae87f..eaf0e359be94 100644 --- a/clang/test/3C/funcptr2.c +++ b/clang/test/3C/funcptr2.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/funcptr2.checked.c -- | count 0 -// RUN: rm %S/funcptr2.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' void f(int *(*fp)(int *)) { //CHECK: void f(_Ptr)) : itype(_Ptr)> fp) { diff --git a/clang/test/3C/funcptr3.c b/clang/test/3C/funcptr3.c index 2ac3a56c5112..13dde9da8f97 100644 --- a/clang/test/3C/funcptr3.c +++ b/clang/test/3C/funcptr3.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/funcptr3.checked.c -- | count 0 -// RUN: rm %S/funcptr3.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' void f(int *(*fp)(int *)) { //CHECK: void f(_Ptr<_Ptr (_Ptr )> fp) _Checked { diff --git a/clang/test/3C/funcptr4.c b/clang/test/3C/funcptr4.c index a19da22fcf8f..44f98b3f7841 100644 --- a/clang/test/3C/funcptr4.c +++ b/clang/test/3C/funcptr4.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/funcptr4.checked.c -- | count 0 -// RUN: rm %S/funcptr4.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' void f(int *(*fp)(int *)) { //CHECK: void f(_Ptr<_Ptr (_Ptr )> fp) _Checked { diff --git a/clang/test/3C/graphs.c b/clang/test/3C/graphs.c index 689d5a6add9e..5b34996e1f1b 100644 --- a/clang/test/3C/graphs.c +++ b/clang/test/3C/graphs.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/graphs.checked.c -- | count 0 -// RUN: rm %S/graphs.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include diff --git a/clang/test/3C/graphs2.c b/clang/test/3C/graphs2.c index 54a5859a0a7c..54ba2fb42651 100644 --- a/clang/test/3C/graphs2.c +++ b/clang/test/3C/graphs2.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/graphs2.checked.c -- | count 0 -// RUN: rm %S/graphs2.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include diff --git a/clang/test/3C/gvar.c b/clang/test/3C/gvar.c index fb7d5bc2a7a0..8e3b8dd65d7b 100644 --- a/clang/test/3C/gvar.c +++ b/clang/test/3C/gvar.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/gvar.checked.c -- | count 0 -// RUN: rm %S/gvar.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' int *x; //CHECK: _Ptr x = ((void *)0); diff --git a/clang/test/3C/i1.c b/clang/test/3C/i1.c index a74414b59669..27bb059ecb31 100644 --- a/clang/test/3C/i1.c +++ b/clang/test/3C/i1.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/i1.checked.c -- | count 0 -// RUN: rm %S/i1.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' /*nothing in this file, save the trivially converted w, should be converted*/ int *foo(int *w) { diff --git a/clang/test/3C/i2.c b/clang/test/3C/i2.c index c6cfdb23bc38..84c039de70bb 100644 --- a/clang/test/3C/i2.c +++ b/clang/test/3C/i2.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/i2.checked.c -- | count 0 -// RUN: rm %S/i2.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' static int *f(int *x) { //CHECK: static _Ptr f(_Ptr x) _Checked { diff --git a/clang/test/3C/i3.c b/clang/test/3C/i3.c index 4c506063b9ab..31040c086dbc 100644 --- a/clang/test/3C/i3.c +++ b/clang/test/3C/i3.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/i3.checked.c -- | count 0 -// RUN: rm %S/i3.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' static int * f(int *x) { //CHECK: static int *f(int *x : itype(_Ptr)) : itype(_Ptr) { diff --git a/clang/test/3C/linkedlist.c b/clang/test/3C/linkedlist.c index e2cef5532ba6..858c7964db40 100644 --- a/clang/test/3C/linkedlist.c +++ b/clang/test/3C/linkedlist.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/linkedlist.checked.c -- | count 0 -// RUN: rm %S/linkedlist.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include diff --git a/clang/test/3C/malloc_array.c b/clang/test/3C/malloc_array.c index 1d7f98e99292..e21d173e779e 100644 --- a/clang/test/3C/malloc_array.c +++ b/clang/test/3C/malloc_array.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/malloc_array.checked.c -- | count 0 -// RUN: rm %S/malloc_array.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *malloc(size_t size) : itype(_Array_ptr) byte_count(size); diff --git a/clang/test/3C/ptrTOptrboth.c b/clang/test/3C/ptrTOptrboth.c index 3c4cf980ddd6..c24c9b76b4c1 100644 --- a/clang/test/3C/ptrTOptrboth.c +++ b/clang/test/3C/ptrTOptrboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrTOptrboth.checked.c -- | count 0 -// RUN: rm %S/ptrTOptrboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrbothmulti1.c b/clang/test/3C/ptrTOptrbothmulti1.c index b68c31941124..0d06dbaec6d6 100644 --- a/clang/test/3C/ptrTOptrbothmulti1.c +++ b/clang/test/3C/ptrTOptrbothmulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/ptrTOptrbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/ptrTOptrbothmulti2.c -// RUN: %clang -c %S/ptrTOptrbothmulti1.checkedNOALL.c %S/ptrTOptrbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/ptrTOptrbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/ptrTOptrbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/ptrTOptrbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/ptrTOptrbothmulti1.checked.c %S/ptrTOptrbothmulti2.checked.c -// RUN: test ! -f %S/ptrTOptrbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/ptrTOptrbothmulti2.checked.convert_again.c -// RUN: rm %S/ptrTOptrbothmulti1.checkedALL.c %S/ptrTOptrbothmulti2.checkedALL.c -// RUN: rm %S/ptrTOptrbothmulti1.checkedNOALL.c %S/ptrTOptrbothmulti2.checkedNOALL.c -// RUN: rm %S/ptrTOptrbothmulti1.checked.c %S/ptrTOptrbothmulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrbothmulti2.c b/clang/test/3C/ptrTOptrbothmulti2.c index b059285239ac..711c183303e7 100644 --- a/clang/test/3C/ptrTOptrbothmulti2.c +++ b/clang/test/3C/ptrTOptrbothmulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/ptrTOptrbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/ptrTOptrbothmulti1.c %s -// RUN: %clang -c %S/ptrTOptrbothmulti1.checkedNOALL2.c %S/ptrTOptrbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/ptrTOptrbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/ptrTOptrbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/ptrTOptrbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/ptrTOptrbothmulti1.checked2.c %S/ptrTOptrbothmulti2.checked2.c -// RUN: test ! -f %S/ptrTOptrbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/ptrTOptrbothmulti2.checked2.convert_again.c -// RUN: rm %S/ptrTOptrbothmulti1.checkedALL2.c %S/ptrTOptrbothmulti2.checkedALL2.c -// RUN: rm %S/ptrTOptrbothmulti1.checkedNOALL2.c %S/ptrTOptrbothmulti2.checkedNOALL2.c -// RUN: rm %S/ptrTOptrbothmulti1.checked2.c %S/ptrTOptrbothmulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrcallee.c b/clang/test/3C/ptrTOptrcallee.c index 662dfcd02fab..3156b0dec22c 100644 --- a/clang/test/3C/ptrTOptrcallee.c +++ b/clang/test/3C/ptrTOptrcallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrTOptrcallee.checked.c -- | count 0 -// RUN: rm %S/ptrTOptrcallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrcalleemulti1.c b/clang/test/3C/ptrTOptrcalleemulti1.c index d43042374094..05cc322bc1a9 100644 --- a/clang/test/3C/ptrTOptrcalleemulti1.c +++ b/clang/test/3C/ptrTOptrcalleemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/ptrTOptrcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/ptrTOptrcalleemulti2.c -// RUN: %clang -c %S/ptrTOptrcalleemulti1.checkedNOALL.c %S/ptrTOptrcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/ptrTOptrcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/ptrTOptrcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/ptrTOptrcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/ptrTOptrcalleemulti1.checked.c %S/ptrTOptrcalleemulti2.checked.c -// RUN: test ! -f %S/ptrTOptrcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/ptrTOptrcalleemulti2.checked.convert_again.c -// RUN: rm %S/ptrTOptrcalleemulti1.checkedALL.c %S/ptrTOptrcalleemulti2.checkedALL.c -// RUN: rm %S/ptrTOptrcalleemulti1.checkedNOALL.c %S/ptrTOptrcalleemulti2.checkedNOALL.c -// RUN: rm %S/ptrTOptrcalleemulti1.checked.c %S/ptrTOptrcalleemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrcalleemulti2.c b/clang/test/3C/ptrTOptrcalleemulti2.c index 0b791795b9fe..668581cc4d8c 100644 --- a/clang/test/3C/ptrTOptrcalleemulti2.c +++ b/clang/test/3C/ptrTOptrcalleemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/ptrTOptrcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/ptrTOptrcalleemulti1.c %s -// RUN: %clang -c %S/ptrTOptrcalleemulti1.checkedNOALL2.c %S/ptrTOptrcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/ptrTOptrcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/ptrTOptrcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/ptrTOptrcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/ptrTOptrcalleemulti1.checked2.c %S/ptrTOptrcalleemulti2.checked2.c -// RUN: test ! -f %S/ptrTOptrcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/ptrTOptrcalleemulti2.checked2.convert_again.c -// RUN: rm %S/ptrTOptrcalleemulti1.checkedALL2.c %S/ptrTOptrcalleemulti2.checkedALL2.c -// RUN: rm %S/ptrTOptrcalleemulti1.checkedNOALL2.c %S/ptrTOptrcalleemulti2.checkedNOALL2.c -// RUN: rm %S/ptrTOptrcalleemulti1.checked2.c %S/ptrTOptrcalleemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrcaller.c b/clang/test/3C/ptrTOptrcaller.c index 0390485a0353..1b207095172d 100644 --- a/clang/test/3C/ptrTOptrcaller.c +++ b/clang/test/3C/ptrTOptrcaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrTOptrcaller.checked.c -- | count 0 -// RUN: rm %S/ptrTOptrcaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrcallermulti1.c b/clang/test/3C/ptrTOptrcallermulti1.c index 1f9d38a80e9d..7c65a54e521d 100644 --- a/clang/test/3C/ptrTOptrcallermulti1.c +++ b/clang/test/3C/ptrTOptrcallermulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/ptrTOptrcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/ptrTOptrcallermulti2.c -// RUN: %clang -c %S/ptrTOptrcallermulti1.checkedNOALL.c %S/ptrTOptrcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/ptrTOptrcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/ptrTOptrcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/ptrTOptrcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/ptrTOptrcallermulti1.checked.c %S/ptrTOptrcallermulti2.checked.c -// RUN: test ! -f %S/ptrTOptrcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/ptrTOptrcallermulti2.checked.convert_again.c -// RUN: rm %S/ptrTOptrcallermulti1.checkedALL.c %S/ptrTOptrcallermulti2.checkedALL.c -// RUN: rm %S/ptrTOptrcallermulti1.checkedNOALL.c %S/ptrTOptrcallermulti2.checkedNOALL.c -// RUN: rm %S/ptrTOptrcallermulti1.checked.c %S/ptrTOptrcallermulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrcallermulti2.c b/clang/test/3C/ptrTOptrcallermulti2.c index 1e47ea16a2e1..bd1baa651712 100644 --- a/clang/test/3C/ptrTOptrcallermulti2.c +++ b/clang/test/3C/ptrTOptrcallermulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/ptrTOptrcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/ptrTOptrcallermulti1.c %s -// RUN: %clang -c %S/ptrTOptrcallermulti1.checkedNOALL2.c %S/ptrTOptrcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/ptrTOptrcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/ptrTOptrcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/ptrTOptrcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/ptrTOptrcallermulti1.checked2.c %S/ptrTOptrcallermulti2.checked2.c -// RUN: test ! -f %S/ptrTOptrcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/ptrTOptrcallermulti2.checked2.convert_again.c -// RUN: rm %S/ptrTOptrcallermulti1.checkedALL2.c %S/ptrTOptrcallermulti2.checkedALL2.c -// RUN: rm %S/ptrTOptrcallermulti1.checkedNOALL2.c %S/ptrTOptrcallermulti2.checkedNOALL2.c -// RUN: rm %S/ptrTOptrcallermulti1.checked2.c %S/ptrTOptrcallermulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrprotoboth.c b/clang/test/3C/ptrTOptrprotoboth.c index 626434ed9ffe..09ebdce5d6a3 100644 --- a/clang/test/3C/ptrTOptrprotoboth.c +++ b/clang/test/3C/ptrTOptrprotoboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrTOptrprotoboth.checked.c -- | count 0 -// RUN: rm %S/ptrTOptrprotoboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrprotocallee.c b/clang/test/3C/ptrTOptrprotocallee.c index de68cba05887..cd9e8933e74e 100644 --- a/clang/test/3C/ptrTOptrprotocallee.c +++ b/clang/test/3C/ptrTOptrprotocallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrTOptrprotocallee.checked.c -- | count 0 -// RUN: rm %S/ptrTOptrprotocallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrprotocaller.c b/clang/test/3C/ptrTOptrprotocaller.c index aaddf1b37c30..a1639373ef79 100644 --- a/clang/test/3C/ptrTOptrprotocaller.c +++ b/clang/test/3C/ptrTOptrprotocaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrTOptrprotocaller.checked.c -- | count 0 -// RUN: rm %S/ptrTOptrprotocaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrprotosafe.c b/clang/test/3C/ptrTOptrprotosafe.c index a10573077b9f..2a7b339ca1f0 100644 --- a/clang/test/3C/ptrTOptrprotosafe.c +++ b/clang/test/3C/ptrTOptrprotosafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrTOptrprotosafe.checked.c -- | count 0 -// RUN: rm %S/ptrTOptrprotosafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrsafe.c b/clang/test/3C/ptrTOptrsafe.c index 6e0dbc21cf04..f199b4fcd30b 100644 --- a/clang/test/3C/ptrTOptrsafe.c +++ b/clang/test/3C/ptrTOptrsafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/ptrTOptrsafe.checked.c -- | count 0 -// RUN: rm %S/ptrTOptrsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrsafemulti1.c b/clang/test/3C/ptrTOptrsafemulti1.c index 2d6495fce49c..38442e52e9c7 100644 --- a/clang/test/3C/ptrTOptrsafemulti1.c +++ b/clang/test/3C/ptrTOptrsafemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/ptrTOptrsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/ptrTOptrsafemulti2.c -// RUN: %clang -c %S/ptrTOptrsafemulti1.checkedNOALL.c %S/ptrTOptrsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/ptrTOptrsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/ptrTOptrsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/ptrTOptrsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/ptrTOptrsafemulti1.checked.c %S/ptrTOptrsafemulti2.checked.c -// RUN: test ! -f %S/ptrTOptrsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/ptrTOptrsafemulti2.checked.convert_again.c -// RUN: rm %S/ptrTOptrsafemulti1.checkedALL.c %S/ptrTOptrsafemulti2.checkedALL.c -// RUN: rm %S/ptrTOptrsafemulti1.checkedNOALL.c %S/ptrTOptrsafemulti2.checkedNOALL.c -// RUN: rm %S/ptrTOptrsafemulti1.checked.c %S/ptrTOptrsafemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/ptrTOptrsafemulti2.c b/clang/test/3C/ptrTOptrsafemulti2.c index c2c28983983d..a20631f85760 100644 --- a/clang/test/3C/ptrTOptrsafemulti2.c +++ b/clang/test/3C/ptrTOptrsafemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/ptrTOptrsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/ptrTOptrsafemulti1.c %s -// RUN: %clang -c %S/ptrTOptrsafemulti1.checkedNOALL2.c %S/ptrTOptrsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/ptrTOptrsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/ptrTOptrsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/ptrTOptrsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/ptrTOptrsafemulti1.checked2.c %S/ptrTOptrsafemulti2.checked2.c -// RUN: test ! -f %S/ptrTOptrsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/ptrTOptrsafemulti2.checked2.convert_again.c -// RUN: rm %S/ptrTOptrsafemulti1.checkedALL2.c %S/ptrTOptrsafemulti2.checkedALL2.c -// RUN: rm %S/ptrTOptrsafemulti1.checkedNOALL2.c %S/ptrTOptrsafemulti2.checkedNOALL2.c -// RUN: rm %S/ptrTOptrsafemulti1.checked2.c %S/ptrTOptrsafemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/ptr_array.c b/clang/test/3C/ptr_array.c index fd53dec752b7..13336b0ff7df 100644 --- a/clang/test/3C/ptr_array.c +++ b/clang/test/3C/ptr_array.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/ptr_array.checked.c -- | count 0 -// RUN: rm %S/ptr_array.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' /* Tests for issue 60. Array initialization had not been implemented, so wild pointer inside and array initializer did not cause the array to be an array diff --git a/clang/test/3C/ptrptr.c b/clang/test/3C/ptrptr.c index af6c50d1e35f..71c1e2ebca8c 100644 --- a/clang/test/3C/ptrptr.c +++ b/clang/test/3C/ptrptr.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/ptrptr.checked.c -- | count 0 -// RUN: rm %S/ptrptr.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include #include diff --git a/clang/test/3C/realloc.c b/clang/test/3C/realloc.c index 8321ec49de22..c490e9aac5bb 100644 --- a/clang/test/3C/realloc.c +++ b/clang/test/3C/realloc.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/realloc.checked.c -- | count 0 -// RUN: rm %S/realloc.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include diff --git a/clang/test/3C/realloc_complex.c b/clang/test/3C/realloc_complex.c index 75aca97969c9..f3d8e1da7c3c 100644 --- a/clang/test/3C/realloc_complex.c +++ b/clang/test/3C/realloc_complex.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/realloc_complex.checked.c -- | count 0 -// RUN: rm %S/realloc_complex.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' /**********************************************************/ /* This file tests the conversion tool's behavior with */ diff --git a/clang/test/3C/refarrsubscript.c b/clang/test/3C/refarrsubscript.c index 30a3dff56d3c..59d868350b71 100644 --- a/clang/test/3C/refarrsubscript.c +++ b/clang/test/3C/refarrsubscript.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/refarrsubscript.checked.c -- | count 0 -// RUN: rm %S/refarrsubscript.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' int **func(int **p, int *x) { //CHECK_NOALL: int **func(int **p : itype(_Ptr<_Ptr>), _Ptr x) : itype(_Ptr) { diff --git a/clang/test/3C/return_not_least.c b/clang/test/3C/return_not_least.c index 0020be84061b..a20412cc98ec 100644 --- a/clang/test/3C/return_not_least.c +++ b/clang/test/3C/return_not_least.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/return_not_least.checked.c -- | count 0 -// RUN: rm %S/return_not_least.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' int *a() { //CHECK_NOALL: int *a(void) : itype(_Ptr) { diff --git a/clang/test/3C/safefptrargboth.c b/clang/test/3C/safefptrargboth.c index 2e2a622a1728..d45f6a2667a0 100644 --- a/clang/test/3C/safefptrargboth.c +++ b/clang/test/3C/safefptrargboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/safefptrargboth.checked.c -- | count 0 -// RUN: rm %S/safefptrargboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargbothmulti1.c b/clang/test/3C/safefptrargbothmulti1.c index da8a9350a444..31364563006a 100644 --- a/clang/test/3C/safefptrargbothmulti1.c +++ b/clang/test/3C/safefptrargbothmulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/safefptrargbothmulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/safefptrargbothmulti2.c -// RUN: %clang -c %S/safefptrargbothmulti1.checkedNOALL.c %S/safefptrargbothmulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/safefptrargbothmulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/safefptrargbothmulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/safefptrargbothmulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/safefptrargbothmulti1.checked.c %S/safefptrargbothmulti2.checked.c -// RUN: test ! -f %S/safefptrargbothmulti1.checked.convert_again.c -// RUN: test ! -f %S/safefptrargbothmulti2.checked.convert_again.c -// RUN: rm %S/safefptrargbothmulti1.checkedALL.c %S/safefptrargbothmulti2.checkedALL.c -// RUN: rm %S/safefptrargbothmulti1.checkedNOALL.c %S/safefptrargbothmulti2.checkedNOALL.c -// RUN: rm %S/safefptrargbothmulti1.checked.c %S/safefptrargbothmulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargbothmulti2.c b/clang/test/3C/safefptrargbothmulti2.c index 11cdd8debfad..9aed548a02a8 100644 --- a/clang/test/3C/safefptrargbothmulti2.c +++ b/clang/test/3C/safefptrargbothmulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/safefptrargbothmulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/safefptrargbothmulti1.c %s -// RUN: %clang -c %S/safefptrargbothmulti1.checkedNOALL2.c %S/safefptrargbothmulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/safefptrargbothmulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/safefptrargbothmulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/safefptrargbothmulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/safefptrargbothmulti1.checked2.c %S/safefptrargbothmulti2.checked2.c -// RUN: test ! -f %S/safefptrargbothmulti1.checked2.convert_again.c -// RUN: test ! -f %S/safefptrargbothmulti2.checked2.convert_again.c -// RUN: rm %S/safefptrargbothmulti1.checkedALL2.c %S/safefptrargbothmulti2.checkedALL2.c -// RUN: rm %S/safefptrargbothmulti1.checkedNOALL2.c %S/safefptrargbothmulti2.checkedNOALL2.c -// RUN: rm %S/safefptrargbothmulti1.checked2.c %S/safefptrargbothmulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargcallee.c b/clang/test/3C/safefptrargcallee.c index afeaf44c1d92..796c909d867c 100644 --- a/clang/test/3C/safefptrargcallee.c +++ b/clang/test/3C/safefptrargcallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/safefptrargcallee.checked.c -- | count 0 -// RUN: rm %S/safefptrargcallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargcalleemulti1.c b/clang/test/3C/safefptrargcalleemulti1.c index 5a149a569af3..1bdb2142908b 100644 --- a/clang/test/3C/safefptrargcalleemulti1.c +++ b/clang/test/3C/safefptrargcalleemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/safefptrargcalleemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/safefptrargcalleemulti2.c -// RUN: %clang -c %S/safefptrargcalleemulti1.checkedNOALL.c %S/safefptrargcalleemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/safefptrargcalleemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/safefptrargcalleemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/safefptrargcalleemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/safefptrargcalleemulti1.checked.c %S/safefptrargcalleemulti2.checked.c -// RUN: test ! -f %S/safefptrargcalleemulti1.checked.convert_again.c -// RUN: test ! -f %S/safefptrargcalleemulti2.checked.convert_again.c -// RUN: rm %S/safefptrargcalleemulti1.checkedALL.c %S/safefptrargcalleemulti2.checkedALL.c -// RUN: rm %S/safefptrargcalleemulti1.checkedNOALL.c %S/safefptrargcalleemulti2.checkedNOALL.c -// RUN: rm %S/safefptrargcalleemulti1.checked.c %S/safefptrargcalleemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargcalleemulti2.c b/clang/test/3C/safefptrargcalleemulti2.c index b8402f8a7a95..f734bb67d129 100644 --- a/clang/test/3C/safefptrargcalleemulti2.c +++ b/clang/test/3C/safefptrargcalleemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/safefptrargcalleemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/safefptrargcalleemulti1.c %s -// RUN: %clang -c %S/safefptrargcalleemulti1.checkedNOALL2.c %S/safefptrargcalleemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/safefptrargcalleemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/safefptrargcalleemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/safefptrargcalleemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/safefptrargcalleemulti1.checked2.c %S/safefptrargcalleemulti2.checked2.c -// RUN: test ! -f %S/safefptrargcalleemulti1.checked2.convert_again.c -// RUN: test ! -f %S/safefptrargcalleemulti2.checked2.convert_again.c -// RUN: rm %S/safefptrargcalleemulti1.checkedALL2.c %S/safefptrargcalleemulti2.checkedALL2.c -// RUN: rm %S/safefptrargcalleemulti1.checkedNOALL2.c %S/safefptrargcalleemulti2.checkedNOALL2.c -// RUN: rm %S/safefptrargcalleemulti1.checked2.c %S/safefptrargcalleemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargcaller.c b/clang/test/3C/safefptrargcaller.c index 7531e7b975f6..d923ba3d5d44 100644 --- a/clang/test/3C/safefptrargcaller.c +++ b/clang/test/3C/safefptrargcaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/safefptrargcaller.checked.c -- | count 0 -// RUN: rm %S/safefptrargcaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargcallermulti1.c b/clang/test/3C/safefptrargcallermulti1.c index be3147533fc0..88a381d81fc2 100644 --- a/clang/test/3C/safefptrargcallermulti1.c +++ b/clang/test/3C/safefptrargcallermulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/safefptrargcallermulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/safefptrargcallermulti2.c -// RUN: %clang -c %S/safefptrargcallermulti1.checkedNOALL.c %S/safefptrargcallermulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/safefptrargcallermulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/safefptrargcallermulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/safefptrargcallermulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/safefptrargcallermulti1.checked.c %S/safefptrargcallermulti2.checked.c -// RUN: test ! -f %S/safefptrargcallermulti1.checked.convert_again.c -// RUN: test ! -f %S/safefptrargcallermulti2.checked.convert_again.c -// RUN: rm %S/safefptrargcallermulti1.checkedALL.c %S/safefptrargcallermulti2.checkedALL.c -// RUN: rm %S/safefptrargcallermulti1.checkedNOALL.c %S/safefptrargcallermulti2.checkedNOALL.c -// RUN: rm %S/safefptrargcallermulti1.checked.c %S/safefptrargcallermulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargcallermulti2.c b/clang/test/3C/safefptrargcallermulti2.c index 5d9e7ca6b1f4..491e7e56c0c4 100644 --- a/clang/test/3C/safefptrargcallermulti2.c +++ b/clang/test/3C/safefptrargcallermulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/safefptrargcallermulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/safefptrargcallermulti1.c %s -// RUN: %clang -c %S/safefptrargcallermulti1.checkedNOALL2.c %S/safefptrargcallermulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/safefptrargcallermulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/safefptrargcallermulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/safefptrargcallermulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/safefptrargcallermulti1.checked2.c %S/safefptrargcallermulti2.checked2.c -// RUN: test ! -f %S/safefptrargcallermulti1.checked2.convert_again.c -// RUN: test ! -f %S/safefptrargcallermulti2.checked2.convert_again.c -// RUN: rm %S/safefptrargcallermulti1.checkedALL2.c %S/safefptrargcallermulti2.checkedALL2.c -// RUN: rm %S/safefptrargcallermulti1.checkedNOALL2.c %S/safefptrargcallermulti2.checkedNOALL2.c -// RUN: rm %S/safefptrargcallermulti1.checked2.c %S/safefptrargcallermulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargprotoboth.c b/clang/test/3C/safefptrargprotoboth.c index 4844375c2dec..d2f04c9b7ece 100644 --- a/clang/test/3C/safefptrargprotoboth.c +++ b/clang/test/3C/safefptrargprotoboth.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/safefptrargprotoboth.checked.c -- | count 0 -// RUN: rm %S/safefptrargprotoboth.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargprotocallee.c b/clang/test/3C/safefptrargprotocallee.c index 40e2a77e8e91..92df33802e00 100644 --- a/clang/test/3C/safefptrargprotocallee.c +++ b/clang/test/3C/safefptrargprotocallee.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/safefptrargprotocallee.checked.c -- | count 0 -// RUN: rm %S/safefptrargprotocallee.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargprotocaller.c b/clang/test/3C/safefptrargprotocaller.c index 5c11921c714a..94ab69575385 100644 --- a/clang/test/3C/safefptrargprotocaller.c +++ b/clang/test/3C/safefptrargprotocaller.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/safefptrargprotocaller.checked.c -- | count 0 -// RUN: rm %S/safefptrargprotocaller.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargprotosafe.c b/clang/test/3C/safefptrargprotosafe.c index ba52bbeedc60..2853172600ee 100644 --- a/clang/test/3C/safefptrargprotosafe.c +++ b/clang/test/3C/safefptrargprotosafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/safefptrargprotosafe.checked.c -- | count 0 -// RUN: rm %S/safefptrargprotosafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargsafe.c b/clang/test/3C/safefptrargsafe.c index 53975d16fc7f..4830741eb993 100644 --- a/clang/test/3C/safefptrargsafe.c +++ b/clang/test/3C/safefptrargsafe.c @@ -1,10 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - - -// RUN: 3c -alltypes -output-postfix=checked %s -// RUN: 3c -alltypes %S/safefptrargsafe.checked.c -- | count 0 -// RUN: rm %S/safefptrargsafe.checked.c +// RUN: %S/3c-regtest.py --predefined-script common-testgenerator %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargsafemulti1.c b/clang/test/3C/safefptrargsafemulti1.c index bf1f2ee797e8..32ff38a99497 100644 --- a/clang/test/3C/safefptrargsafemulti1.c +++ b/clang/test/3C/safefptrargsafemulti1.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL %s %S/safefptrargsafemulti2.c -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL %s %S/safefptrargsafemulti2.c -// RUN: %clang -c %S/safefptrargsafemulti1.checkedNOALL.c %S/safefptrargsafemulti2.checkedNOALL.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/safefptrargsafemulti1.checkedNOALL.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/safefptrargsafemulti1.checkedALL.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked %S/safefptrargsafemulti2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/safefptrargsafemulti1.checked.c %S/safefptrargsafemulti2.checked.c -// RUN: test ! -f %S/safefptrargsafemulti1.checked.convert_again.c -// RUN: test ! -f %S/safefptrargsafemulti2.checked.convert_again.c -// RUN: rm %S/safefptrargsafemulti1.checkedALL.c %S/safefptrargsafemulti2.checkedALL.c -// RUN: rm %S/safefptrargsafemulti1.checkedNOALL.c %S/safefptrargsafemulti2.checkedNOALL.c -// RUN: rm %S/safefptrargsafemulti1.checked.c %S/safefptrargsafemulti2.checked.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/safefptrargsafemulti2.c b/clang/test/3C/safefptrargsafemulti2.c index 72b4e750017c..a41da27fa1bc 100644 --- a/clang/test/3C/safefptrargsafemulti2.c +++ b/clang/test/3C/safefptrargsafemulti2.c @@ -1,15 +1,4 @@ -// RUN: 3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL2 %S/safefptrargsafemulti1.c %s -// RUN: 3c -base-dir=%S -addcr -output-postfix=checkedNOALL2 %S/safefptrargsafemulti1.c %s -// RUN: %clang -c %S/safefptrargsafemulti1.checkedNOALL2.c %S/safefptrargsafemulti2.checkedNOALL2.c -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/safefptrargsafemulti2.checkedNOALL2.c %s -// RUN: FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/safefptrargsafemulti2.checkedALL2.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=checked2 %S/safefptrargsafemulti1.c %s -// RUN: 3c -base-dir=%S -alltypes -output-postfix=convert_again %S/safefptrargsafemulti1.checked2.c %S/safefptrargsafemulti2.checked2.c -// RUN: test ! -f %S/safefptrargsafemulti1.checked2.convert_again.c -// RUN: test ! -f %S/safefptrargsafemulti2.checked2.convert_again.c -// RUN: rm %S/safefptrargsafemulti1.checkedALL2.c %S/safefptrargsafemulti2.checkedALL2.c -// RUN: rm %S/safefptrargsafemulti1.checkedNOALL2.c %S/safefptrargsafemulti2.checkedNOALL2.c -// RUN: rm %S/safefptrargsafemulti1.checked2.c %S/safefptrargsafemulti2.checked2.c +// RUN: %S/3c-regtest.py --predefined-script multi %s -t %t --clang '%clang' /*********************************************************************************/ diff --git a/clang/test/3C/script_generator.py b/clang/test/3C/script_generator.py new file mode 100644 index 000000000000..9f1c7f63e172 --- /dev/null +++ b/clang/test/3C/script_generator.py @@ -0,0 +1,128 @@ +# script_generator.py: Generates an unexpanded RUN script for a test file based +# on its name and flags that specify the kind of testing to be done. Used by +# both 3c-regtest.py and 3c-regtest-unconvert.py. + +import os +import re +import argparse + +def remove_suffix(string, suffix): + return string[:-len(suffix)] if string.endswith(suffix) else None + +# Right now, our focus is on exactly reproducing the existing RUN scripts to +# verify the conversion. Obviously, we eventually want to remove the cruft and +# add new features. TBD whether we complete the verification first and then +# change the scripts here or we maintain old scripts (for reproduction) and new +# scripts (for running tests) here in parallel for some period of time. + +# Unlike all the other % codes that are substituted by `lit`, %B is a special +# code that generate_script (below) replaces with the basename of the test file +# without the `.c` extension. This reproduces some of the scripts in existing +# test files. +common_script = '''\ +3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - +3c -output-postfix=checked -alltypes %s +3c -alltypes %S/%B.checked.c -- | %COMPARISON +rm %S/%B.checked.c +''' + +# As per https://github.com/correctcomputation/checkedc-clang/issues/328, the +# `count 0` may be replaced with `diff -w %S/%B.checked.c -` in the future. +common_script_no_diff = common_script.replace('%COMPARISON', 'count 0') + +# I guess the important part here is the `-w` to work around the rewriter not +# exactly preserving whitespace? +common_script_diff_w = common_script.replace('%COMPARISON', 'diff -w %S/%B.checked.c -') + +# Equivalent variant of common_script_no_diff seen in testgenerator.py. +common_script_testgenerator = '''\ +3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s +3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s +3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - + +3c -alltypes -output-postfix=checked %s +3c -alltypes %S/%B.checked.c -- | count 0 +rm %S/%B.checked.c +''' + +# Additional codes substituted in generate_script: +# - %M: %B with a trailing `1` or `2` removed +# - %O ("other"): %B with a trailing `1` replaced with `2` or vice versa +# - %F{1,2}: %s if the digit matches the test filename, %S/%O otherwise +# - %2: `2` in a multi2 input file, otherwise empty string +multi_script='''\ +3c -base-dir=%S -addcr -alltypes -output-postfix=checkedALL%2 %F1 %F2 +3c -base-dir=%S -addcr -output-postfix=checkedNOALL%2 %F1 %F2 +%clang -c %S/%M1.checkedNOALL%2.c %S/%M2.checkedNOALL%2.c +FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" --input-file %S/%B.checkedNOALL%2.c %s +FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" --input-file %S/%B.checkedALL%2.c %s +3c -base-dir=%S -alltypes -output-postfix=checked%2 %S/%O.c %s +3c -base-dir=%S -alltypes -output-postfix=convert_again %S/%M1.checked%2.c %S/%M2.checked%2.c +test ! -f %S/%M1.checked%2.convert_again.c +test ! -f %S/%M2.checked%2.convert_again.c +rm %S/%M1.checkedALL%2.c %S/%M2.checkedALL%2.c +rm %S/%M1.checkedNOALL%2.c %S/%M2.checkedNOALL%2.c +rm %S/%M1.checked%2.c %S/%M2.checked%2.c +''' + +predefined_scripts = { + 'common': common_script_no_diff, + 'common-diff-w': common_script_diff_w, + 'common-testgenerator': common_script_testgenerator, + 'multi': multi_script +} + +parser = argparse.ArgumentParser( + # This will be shown as if it is a program name runnable by the user. It + # isn't, but give the user a clue what this argument parser represents. + prog='<3c-regtest script generator>', + # Without this, the parser in 3c-regtest.py raises an error about + # conflicting --help options. That's silly; one would expect argparse to + # handle this specially. + add_help=False +) +# TODO: Add help +parser.add_argument('test_file') +# Future: Redesign in terms of kinds of testing rather than merely selecting one +# of the existing 5 scripts of the test updating programs. +parser.add_argument('--predefined-script', required=True, + choices=list(predefined_scripts.keys())) + +# `argobj` should be an argument object returned by `parser` or a parser based +# on it. Returns a list of command strings. +def generate_commands(argobj): + test_file = argobj.test_file + predefined_script_name = argobj.predefined_script + + # FUTURE: If this assumption is no longer valid, update this code. + test_file_basename_without_ext = remove_suffix(os.path.basename(test_file), '.c') + if test_file_basename_without_ext is None: + sys.exit('Test filename does not end in `.c`.') + script = remove_suffix(predefined_scripts[predefined_script_name], '\n') + script = script.replace('%B', test_file_basename_without_ext) + + if predefined_script_name == 'multi': + last = test_file_basename_without_ext[-1:] + multi_base = test_file_basename_without_ext[:-1] + if last == '1': + multi_other = multi_base + '2' + f1 = '%s' + f2 = '%S/%O.c' + p2 = '' + elif last == '2': + multi_other = multi_base + '1' + f1 = '%S/%O.c' + f2 = '%s' + p2 = '2' + else: + sys.exit('--predefined-script is multi, ' + 'but test filename does not end in `1.c` or `2.c`.') + script = script.replace('%F1', f1) + script = script.replace('%F2', f2) + script = script.replace('%M', multi_base) + script = script.replace('%O', multi_other) + script = script.replace('%2', p2) + + return script.split('\n') diff --git a/clang/test/3C/single_ptr_calloc.c b/clang/test/3C/single_ptr_calloc.c index e235f6f76a69..2ac41a5f699e 100644 --- a/clang/test/3C/single_ptr_calloc.c +++ b/clang/test/3C/single_ptr_calloc.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/single_ptr_calloc.checked.c -- | count 0 -// RUN: rm %S/single_ptr_calloc.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include diff --git a/clang/test/3C/subtyp.c b/clang/test/3C/subtyp.c index 0ade3c53cf1c..39ae1205ed4f 100644 --- a/clang/test/3C/subtyp.c +++ b/clang/test/3C/subtyp.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/subtyp.checked.c -- | count 0 -// RUN: rm %S/subtyp.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' void take(int *p : itype(_Nt_array_ptr)); //CHECK: void take(int *p : itype(_Nt_array_ptr)); diff --git a/clang/test/3C/test_updater.py b/clang/test/3C/test_updater.py index 77ff1a753aa2..6a8269e07cb9 100755 --- a/clang/test/3C/test_updater.py +++ b/clang/test/3C/test_updater.py @@ -94,12 +94,9 @@ def process_smart(filename, diff): manual_tests = ['3d-allocation.c', 'alloc_type_param.c', 'amper.c', - 'anonstruct.c', - 'arrinlinestruct.c', 'calloc.c', 'canonical_type_cast.c', 'checkedregions.c', - 'complexinlinestruct.c', 'ex1.c', 'extGVar.c', 'extstructfields.c', @@ -111,15 +108,16 @@ def process_smart(filename, diff): 'funcptr3.c', 'funcptr4.c', 'graphs.c', + 'graphs.c', 'graphs2.c', 'gvar.c', 'i1.c', 'i2.c', 'i3.c', - 'inlinestruct_difflocs.c', - 'inlinestructinfunc.c', 'linkedlist.c', 'malloc_array.c', + 'ptr_array.c', + 'ptrptr.c', 'realloc.c', 'realloc_complex.c', 'refarrsubscript.c', @@ -131,10 +129,7 @@ def process_smart(filename, diff): 'valist.c', 'cast.c'] -need_diff = ['compound_literal.c', -'graphs.c', -'ptr_array.c', -'ptrptr.c'] +need_diff = ['compound_literal.c'] b_tests = ['b10_allsafepointerstruct.c', 'b11_calleestructnp.c', diff --git a/clang/test/3C/unsafeunion.c b/clang/test/3C/unsafeunion.c index 436f5d2a4c7a..037680a530ba 100644 --- a/clang/test/3C/unsafeunion.c +++ b/clang/test/3C/unsafeunion.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/unsafeunion.checked.c -- | count 0 -// RUN: rm %S/unsafeunion.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include extern _Itype_for_any(T) void *calloc(size_t nmemb, size_t size) : itype(_Array_ptr) byte_count(nmemb * size); diff --git a/clang/test/3C/unsigned_signed_cast.c b/clang/test/3C/unsigned_signed_cast.c index ad9df747128e..032ed4018a73 100644 --- a/clang/test/3C/unsigned_signed_cast.c +++ b/clang/test/3C/unsigned_signed_cast.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/unsigned_signed_cast.checked.c -- | count 0 -// RUN: rm %S/unsigned_signed_cast.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' /*unsigned integer cast*/ diff --git a/clang/test/3C/valist.c b/clang/test/3C/valist.c index 09a678e31738..484f2b3c56e3 100644 --- a/clang/test/3C/valist.c +++ b/clang/test/3C/valist.c @@ -1,9 +1,4 @@ -// RUN: 3c -alltypes -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_ALL","CHECK" %s -// RUN: 3c -addcr %s -- | FileCheck -match-full-lines -check-prefixes="CHECK_NOALL","CHECK" %s -// RUN: 3c -addcr %s -- | %clang -c -fcheckedc-extension -x c -o /dev/null - -// RUN: 3c -output-postfix=checked -alltypes %s -// RUN: 3c -alltypes %S/valist.checked.c -- | count 0 -// RUN: rm %S/valist.checked.c +// RUN: %S/3c-regtest.py --predefined-script common %s -t %t --clang '%clang' #include typedef int lua_State;