|
3 | 3 | from update_verify_tests.core import check_expectations |
4 | 4 |
|
5 | 5 | """ |
6 | | - Pipe output from clang's -verify into this script to have the test case updated to expect the actual diagnostic output. |
| 6 | + Pipe output from swift-frontend's -verify into this script to have the test case updated to expect the actual diagnostic output. |
7 | 7 | When inserting new expected-* checks it will place them on the line before the location of the diagnostic, with an @+1, |
8 | 8 | or @+N for some N if there are multiple diagnostics emitted on the same line. If the current checks are using @-N for |
9 | 9 | this line, the new check will follow that convention also. |
10 | 10 | Existing checks will be left untouched as much as possible, including their location and whitespace content, to minimize |
11 | 11 | diffs. If inaccurate their count will be updated, or the check removed entirely. |
12 | 12 |
|
13 | 13 | Missing features: |
14 | | - - multiple prefixes on the same line (-verify=my-prefix,my-other-prefix) |
15 | | - - multiple prefixes on separate RUN lines (RUN: -verify=my-prefix\nRUN: -verify my-other-prefix) |
16 | | - - regexes with expected-*-re: existing ones will be left untouched if accurate, but the script will abort if there are any |
17 | | - diagnostic mismatches on the same line. |
| 14 | + - multiple prefixes on the same line (-verify-additional-prefix my-prefix -verify-additional-prefix my-other-prefix) |
| 15 | + - multiple prefixes on separate RUN lines (RUN: -verify-additional-prefix my-prefix\nRUN: -verify-additional-prefix my-other-prefix) |
| 16 | + - regexes matchers |
18 | 17 | - multiple checks targeting the same line are supported, but a line may only contain one check |
19 | 18 | - if multiple checks targeting the same line are failing the script is not guaranteed to produce a minimal diff |
| 19 | + - remarks |
| 20 | + - expansions |
| 21 | + - columns |
| 22 | + - fix-its |
| 23 | + - doc files |
20 | 24 |
|
21 | 25 | Example usage: |
22 | | - clang -verify [file] | python3 update-verify-tests.py |
23 | | - clang -verify=check [file] | python3 update-verify-tests.py --prefix check |
| 26 | + swift-frontend -verify [file] | python3 update-verify-tests.py |
| 27 | + swift-frontend -verify -verify-additional-prefix check- [file] | python3 update-verify-tests.py --prefix check- |
24 | 28 | """ |
25 | 29 |
|
26 | 30 |
|
|
0 commit comments