diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-24 21:01:50 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-24 21:01:50 +0000 |
commit | 3ffa36ac334638a691f804b468d2d359feba2de8 (patch) | |
tree | da3fa4d64fd1859c5f0079d283cf106e00dcc08e /tools/gn/function_foreach.cc | |
parent | e8320e01612984cc1847fabb5d40f26336d03550 (diff) | |
download | chromium_src-3ffa36ac334638a691f804b468d2d359feba2de8.zip chromium_src-3ffa36ac334638a691f804b468d2d359feba2de8.tar.gz chromium_src-3ffa36ac334638a691f804b468d2d359feba2de8.tar.bz2 |
GN foreach should mark the list identifier as used.
Previously an identifier used as the list in a feoreach statement would not count as "using" the identifier, which would give unused variable errors. Added a unit test.
Checks for unused identifiers in component(). Previously these were not checked. This checking turned up a misspelling in the cc build. Added a unit test.
Fixes for the ozone media build (turned up when testing).
R=dpranke@chromium.org
Review URL: https://codereview.chromium.org/420443003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/function_foreach.cc')
-rw-r--r-- | tools/gn/function_foreach.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/gn/function_foreach.cc b/tools/gn/function_foreach.cc index 40f3892..06a2dc1 100644 --- a/tools/gn/function_foreach.cc +++ b/tools/gn/function_foreach.cc @@ -70,7 +70,7 @@ Value RunForEach(Scope* scope, const Value* list_value = NULL; const IdentifierNode* list_identifier = args_vector[1]->AsIdentifier(); if (list_identifier) { - list_value = scope->GetValue(list_identifier->value().value()); + list_value = scope->GetValue(list_identifier->value().value(), true); if (!list_value) { *err = Err(args_vector[1], "Undefined identifier."); return Value(); |