Skip to content

Commit 0979d34

Browse files
committed
[utils] update documentation for update-verify-tests
This updates the documentation to reflect the Swift port of this script, rather than the original clang version.
1 parent 8bff12a commit 0979d34

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

utils/update-verify-tests.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,28 @@
33
from update_verify_tests.core import check_expectations
44

55
"""
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.
77
When inserting new expected-* checks it will place them on the line before the location of the diagnostic, with an @+1,
88
or @+N for some N if there are multiple diagnostics emitted on the same line. If the current checks are using @-N for
99
this line, the new check will follow that convention also.
1010
Existing checks will be left untouched as much as possible, including their location and whitespace content, to minimize
1111
diffs. If inaccurate their count will be updated, or the check removed entirely.
1212
1313
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
1817
- multiple checks targeting the same line are supported, but a line may only contain one check
1918
- 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
2024
2125
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-
2428
"""
2529

2630

0 commit comments

Comments
 (0)