Both of these tools seem to share some common goals and while the documentation of clang-tidy is quite explicit about its capabilities, clang-check's is a bit sparse.
It would be nice if I could run only one of these tools while having the same checks in place. Obviously, clang-tidy has some features which are absent in clang-check, so the question is:
Is there a combination of checks for clang-tidy that includes all of the features of clang-check -analyze
?
After looking at the sources of both tools, clang-check -analyze
instantiate an AnalysisASTConsumer
from the StaticAnalyzer lib through here.
clang-tidy also does it if analyzer options are supplied.
So, everything seems to indicate that clang-tidy -check='clang-analyzer-*'
is equivalent to clang-check -analyze
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With