Page MenuHomePhabricator

[analyzer] Update the documentation to show the command line option

Authored by george.karpenkov on Feb 9 2018, 11:48 AM.



There seems to be a very large amount of confusion on how to analyze just a single file from the command line. I think we should document this case, even if it's not the most supported workflow (as open-source users would find that in tutorials anyway)

Diff Detail

Event Timeline

NoQ added inline comments.Feb 9 2018, 12:02 PM

Ew. Should we support this in a better way, i.e. by adding a user-friendly driver flag?

Or just tell them to always use -o where (does it also require -Xclang)?

george.karpenkov marked an inline comment as done.
NoQ added inline comments.Feb 9 2018, 5:14 PM

Suggesting: "You can append --analyze to any compilation command. This would tell Clang to perform analysis instead of compilation. In other words, all usual clang flags...".


... but it won't generate index.html, which, according to my little observations, most novice users would expect to see. I still feel that we should recommend just pre-pending scan-build to the clang command as the first option.

We don't consider --analyze to be public UI, which is why it is not documented. The supported interface to the analyzer is scan-build.

george.karpenkov abandoned this revision.Feb 23 2018, 4:53 PM