3 ms·
Though scan-build is usually the simpler option, clang itself does have an --analyze flag which writes analysis results in various formats, including the same h
by 0x09 6y ago
Though scan-build is usually the simpler option, clang itself does have an --analyze flag which writes analysis results in various formats, including the same html reports that scan-build would generate. But to see this on standard out
clang --analyze --analyzer-output text ...
Will print the entire analysis tree in the same format as regular diagnostics.
- TeaDude 6y agoThe only problem is the CTU mess if you're analyzing more than one file, thus the aforementioned tools' necessity. Hopefully in a future version the kinks are ironed out and we can just use the flag without any hassle. It's like if we needed to still manually link our files with ld before compiling them instead of clang auto doing it.