commit | ced9fbfe6943854e65ada4ac1849d1fa4cb19348 | [log] [tgz] |
---|---|---|
author | Takuto Ikuta <tikuta@google.com> | Tue Apr 26 12:04:19 2022 +0900 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Apr 26 09:39:08 2022 +0000 |
tree | 8f3ec4b90de2c410daf409e7d3a42f409d46c60e | |
parent | 80309a7a87eb663f93093abaa49e7783643bfe8c [diff] |
enable range-loop-analysis warning This is for https://gn-review.googlesource.com/c/gn/+/13781/3#message-9ed3cea2037c3f884544388fb648486e6b28fe3c I think this warning does not harm build. https://clang.llvm.org/docs/DiagnosticsReference.html#wrange-loop-analysis Change-Id: Ice3ef82ad578b1ca3b50643b0de8e9b2cb20c1aa Reviewed-on: https://gn-review.googlesource.com/c/gn/+/13800 Reviewed-by: Sylvain Defresne <sdefresne@chromium.org> Commit-Queue: Takuto Ikuta <tikuta@google.com>
diff --git a/build/gen.py b/build/gen.py index 6e915b8..e814b58 100755 --- a/build/gen.py +++ b/build/gen.py
@@ -439,6 +439,7 @@ '-Wall', '-Wextra', '-Wno-unused-parameter', + '-Wrange-loop-analysis', '-Wundef', '-std=c++17' ])
diff --git a/src/gn/analyzer.cc b/src/gn/analyzer.cc index fd93879..e15c265 100644 --- a/src/gn/analyzer.cc +++ b/src/gn/analyzer.cc
@@ -183,7 +183,7 @@ } } - for (const auto& kv : dict->DictItems()) { + for (const auto kv : dict->DictItems()) { if (kv.first == kFilesKey || kv.first == kAdditonalCompileTargetsKey || kv.first == kTestTargetsKey) { continue;