vbvictor wrote:

> > And what benefits does this script has over regular clang-tidy run with 
> > this check? If you do `run-clang-tidy -p build/ 
> > -checks='-*,modernize-type-traits' -fix` you should get similar results at 
> > cost of roughly 1 compilation
> 
> A lot :-)
> 
> 1. It's much, much, _much_ faster and lower-cost. You can run it on an entire 
> codebase in seconds on a single CPU. Try compiling tens of thousands (or 
> more) files.
> 2. It's also much, much, much easier. `run-clang-tidy` brushes the complexity 
> of setting up clang-tidy under a rug. It is not so easy for every build 
> system.
> 3. It doesn't require the project to compile with Clang specifically.
> 4. It works on files that don't compile yet, so people can run it even on 
> broken files if they want.
> 5. (edit) It also works on code that isn't strictly compiled (like in a 
> stringified code block, or pseudo-C++ test file, or in documentation, etc.)

Yeah, those are general limitation tidy as a "clang tool".
Still, I think we _tool_ documentation should only have paragraphs about how to 
use _the tool_ and nothing else - that is what I think users expect from the 
docs. Otherwise, docs will bloat with countless "hacky ways" to do same jobs as 
tidy does.
For now, I don't want this to become a precedent that posting hacky scripts is 
okay because other people could start doing so (which will eventually bloat 
docs with more and more scripts).

https://github.com/llvm/llvm-project/pull/202526
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to