clang-power-tools
clang-power-tools copied to clipboard
Parallel execution of Clang-Tidy over a project
When running clang-tidy over a project, why not running multiple tasks in parallel?
Hi @Philippe91
When we first implemented parallelism for our PowerShell workers, we actually did have support for tidy as well. However, we encountered issues when fixing headers, because on ocassion two or more translation units would cause the same header to be fixed, at the same time. This concurrency problem ended up corrupting the headers.
We decided to remove -parallel support for tidy workflows because of the header corruption issues.
If a solution can be found for that, we would be more than happy to reintroduce -parallel support for tidy workflows.
Regards, Gabriel
Did you consider running clang-tidy first, without fixes, and then to use the LLVM tool "clang-apply-replacements.exe" at the end, in a single thread?
https://devblogs.microsoft.com/cppblog/exploring-clang-tooling-using-build-tools-with-clang-tidy/#lightbox-custom
We did not consider clang-apply-replacements
at the time. Looks very promising, in that it would help solve our parallelism problems.
We will definitely make use of it in a future release of Clang Power Tools.
Thank you for bringing it to our attention.