[PATCH] D121757: [clang-format] Take out common code for parsing blocks
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 25 03:01:08 PDT 2022
owenpan added a comment.
In D121757#3407539 <https://reviews.llvm.org/D121757#3407539>, @owenpan wrote:
> In D121757#3406814 <https://reviews.llvm.org/D121757#3406814>, @sstwcw wrote:
>
>> I tried formatting the files in `clang-formatted-files.txt`. Besides the files in the list that get changed when formatted with the program built from `main`, none gets changed when I format them with the program built from this patch, whether or not `parseSwitch` is modified.
>
> To test a token-changing patch (e.g. inserting/removing braces) on a large codebase like clang, I would go through the following steps:
>
> 1. Build a debug version of clang-format from scratch without applying the patch.
> 2. Run the built clang-format on every `.(c|cpp|h)` file under `clang/`.
> 3. Build clang.
> 4. Run check-clang and save the output in a log file.
> 5. Run `git reset --hard` and apply the patch.
> 6. Build clang-format again.
And then run `git reset --hard` again before step 7 below.
> 7. Add `InsertBraces: true` to `clang/.clang-format`.
> 8. Repeat steps 2-4 above.
> 9. Compare the new log file with the pre-patch one. They should have exactly the same Unresolved/Failed tests. They should also have the same //numbers// of Skipped/Unsupported/Passed/Expectedly Failed tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121757/new/
https://reviews.llvm.org/D121757
More information about the cfe-commits
mailing list