The Clang Static Analyzer

See the official clang static analyzer page for background.

As of early 2017, we have experimental support for the Clang static analysis tool in the Chrome build. Warnings generated by the analysis tool are logged to stderr along with other compiler errors at build time.

To enable static analysis for your build, add the following line to your output directory's args.gn:

use_clang_static_analyzer = true

The next time you rebuild, you should see static analysis warnings appear inline with the usual Clang build warnings and errors.