[UTC] Add --version argument
We have a number of pending changes to update_test_checks.py (and friends) that are essentially blocked on test churn: If the output of UTC for an existing flag combination changes, then the next time a test is regenerated, it will contain many spurious changes. This makes changes to UTC default behavior essentially impossible. Examples of such changes are: * D133943/D142373 want --function-signature to also check the return type/attributes. * D139006/D140212 want to make --function-signature the default behavior. * D142452 wants to add wildcards for block labels. This patch tries to resolve this issue by adding a --version argument, which works as follows: * When regenerating an old test, the default version is 1. * When generating a new test, the default version is the newest. When an explicit version is specified, that of course wins. This means that any currently existing tests will keep using --version 1 format, while any new tests will automatically embed --version N where N is the latest version, and then keep using that test format from then on. This patch only implements the --version flag without bumping the default version, so it does not have any visible behavior change by itself. Differential Revision: https://reviews.llvm.org/D142473
Loading
Please sign in to comment