4 ms·
The static analysis stuff is something that is in clang's favor. Because of its architecture, static analysis is included, and can be run at compile time throug
by Sanddancer 9y ago
The static analysis stuff is something that is in clang's favor. Because of its architecture, static analysis is included, and can be run at compile time through a wrapper called scan-build [1]. So, to get static analysis, most of the time, you just have to run "scan-build make" and it'll do things for you. Clang's clang-tidy tool also handles linting as well, with a misra plugin too [2]. That's the big advantage I see with clang, is that its architecture makes a lot of these things a lot easier to add, which is an area that gcc is just barely starting to address.
[1] https://clang-analyzer.llvm.org/scan-build.html https://clang-analyzer.llvm.org/scan-build.html
[2] https://github.com/rettichschnidi/clang-tidy-misra https://github.com/rettichschnidi/clang-tidy-misra