| OLD | NEW |
| 1 # The Clang Static Analyzer | 1 # The Clang Static Analyzer |
| 2 | 2 |
| 3 See the [official clang static analyzer page](http://clang-analyzer.llvm.org/) | 3 See the [official clang static analyzer page](http://clang-analyzer.llvm.org/) |
| 4 for background. | 4 for background. |
| 5 | 5 |
| 6 As of early 2017, we have experimental support for the Clang static analysis | 6 As of early 2017, we have experimental support for the Clang static analysis |
| 7 tool in the Chrome build. Warnings generated by the analysis tool are logged | 7 tool in the Chrome build. Warnings generated by the analysis tool are logged |
| 8 to stderr along with other compiler errors at build time. | 8 to stderr along with other compiler errors at build time. |
| 9 | 9 |
| 10 To enable static analysis for your build, add the following line to your | 10 To enable static analysis for your build, add the following line to your |
| 11 output directory's `args.gn`: | 11 output directory's `args.gn`: |
| 12 | 12 |
| 13 ``` | 13 ``` |
| 14 use_clang_static_analyzer = true | 14 use_clang_static_analyzer = true |
| 15 ``` | 15 ``` |
| 16 | 16 |
| 17 The next time you rebuild, you should see static analysis warnings appear inline | 17 The next time you rebuild, you should see static analysis warnings appear inline |
| 18 with the usual Clang build warnings and errors. | 18 with the usual Clang build warnings and errors. |
| 19 | 19 |
| 20 ## Future plans/potential issues | |
| 21 * Support for running under GOMA is untested, but will be added shortly if | |
| 22 feasible. | |
| OLD | NEW |