diff options
author | thakis <thakis@chromium.org> | 2016-01-06 10:13:46 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-06 18:14:48 +0000 |
commit | 29ec253a32cc66d0855d8e6f17aafa00b1996a80 (patch) | |
tree | b53825048206bc33f04a792cce38ef2cb2980824 /build/common.gypi | |
parent | b278d9a9e198b8bfa7d9c269d704d78e50b94eae (diff) | |
download | chromium_src-29ec253a32cc66d0855d8e6f17aafa00b1996a80.zip chromium_src-29ec253a32cc66d0855d8e6f17aafa00b1996a80.tar.gz chromium_src-29ec253a32cc66d0855d8e6f17aafa00b1996a80.tar.bz2 |
clang: Enable -Wfor-loop-analysis.
Every time I try this warning, it finds a few true positives
and has no false negatives. It looks like an excellent
warning.
I did three builds of target "gfx" in both Release and Debug
with and without this warning enabled, doing local (non-goma)
component builds (running -t clean between each build). This
builds about 1.6k build steps each time.
Warning on:
Release: 0m26.850s 0m27.227s 0m27.159s
Debug: 0m24.811s 0m25.044s 0m25.498s
Warning off:
Release: 0m26.834s 0m27.242s 0m26.952s
Debug: 0m24.879s 0m25.064s 0m25.673s
See e.g. the comments in
https://codereview.chromium.org/1269343005/diff/240001/chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc
https://codereview.chromium.org/196433002/diff/60001/media/cast/transport/pacing/paced_sender_unittest.cc
for examples.
BUG=none
TBR=imcheng
Review URL: https://codereview.chromium.org/1273313003
Cr-Commit-Position: refs/heads/master@{#367855}
Diffstat (limited to 'build/common.gypi')
-rw-r--r-- | build/common.gypi | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/build/common.gypi b/build/common.gypi index 577a95c..0c201a5 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -2633,6 +2633,12 @@ 'clang_warning_flags': [ '-Wheader-hygiene', + # TODO(thakis): Add -Wfor-loop-analysis to -Wall in clang, remove this: + '-Wfor-loop-analysis', + + # TODO(thakis): Consider -Wloop-analysis (turns on + # -Wrange-loop-analysis too). + # Don't die on dtoa code that uses a char as an array index. # This is required solely for base/third_party/dmg_fp/dtoa.cc. '-Wno-char-subscripts', |