| 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 We don't run this regularly (because the analyzer's | 6 We don't run this regularly (because the analyzer's |
| 7 [support for C++ isn't great yet](http://clang-analyzer.llvm.org/dev_cxx.html)), | 7 [support for C++ isn't great yet](http://clang-analyzer.llvm.org/dev_cxx.html)), |
| 8 so everything on this page is likely broken. The last time I checked, the | 8 so everything on this page is likely broken. The last time I checked, the |
| 9 analyzer reported mostly uninteresting things. This assumes you're | 9 analyzer reported mostly uninteresting things. This assumes you're |
| 10 [building chromium with clang](clang.md). | 10 [building chromium with clang](clang.md). |
| 11 | 11 |
| 12 You need an llvm checkout to get `scan-build` and `scan-view`; the easiest way | 12 You need an llvm checkout to get `scan-build` and `scan-view`; the easiest way |
| 13 to get that is to run | 13 to get that is to run |
| 14 | 14 |
| 15 ```shell | 15 ```shell |
| 16 tools/clang/scripts/update.sh --force-local-build --without-android | 16 tools/clang/scripts/update.py --force-local-build --without-android |
| 17 ``` | 17 ``` |
| 18 | 18 |
| 19 ## With make | 19 ## With make |
| 20 | 20 |
| 21 To build base, if you use the make build: | 21 To build base, if you use the make build: |
| 22 | 22 |
| 23 ``` | 23 ``` |
| 24 builddir_name=out_analyze \ | 24 builddir_name=out_analyze \ |
| 25 PATH=$PWD/third_party/llvm-build/Release+Asserts/bin:$PATH \ | 25 PATH=$PWD/third_party/llvm-build/Release+Asserts/bin:$PATH \ |
| 26 third_party/llvm/tools/clang/tools/scan-build/scan-build \ | 26 third_party/llvm/tools/clang/tools/scan-build/scan-build \ |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 ## Stuff found by the static analyzer | 65 ## Stuff found by the static analyzer |
| 66 | 66 |
| 67 * https://code.google.com/p/skia/issues/detail?id=399 | 67 * https://code.google.com/p/skia/issues/detail?id=399 |
| 68 * https://code.google.com/p/skia/issues/detail?id=400 | 68 * https://code.google.com/p/skia/issues/detail?id=400 |
| 69 * https://codereview.chromium.org/8308008/ | 69 * https://codereview.chromium.org/8308008/ |
| 70 * https://codereview.chromium.org/8313008/ | 70 * https://codereview.chromium.org/8313008/ |
| 71 * https://codereview.chromium.org/8308009/ | 71 * https://codereview.chromium.org/8308009/ |
| 72 * https://codereview.chromium.org/10031018/ | 72 * https://codereview.chromium.org/10031018/ |
| 73 * https://codereview.chromium.org/12390058/ | 73 * https://codereview.chromium.org/12390058/ |
| OLD | NEW |