Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(337)

Side by Side Diff: tools/gn/functions_target.cc

Issue 420443003: GN foreach should mark the list identifier as used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/gn/function_foreach_unittest.cc ('k') | tools/gn/functions_target_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/functions.h" 5 #include "tools/gn/functions.h"
6 6
7 #include "tools/gn/config_values_generator.h" 7 #include "tools/gn/config_values_generator.h"
8 #include "tools/gn/err.h" 8 #include "tools/gn/err.h"
9 #include "tools/gn/parse_tree.h" 9 #include "tools/gn/parse_tree.h"
10 #include "tools/gn/scope.h" 10 #include "tools/gn/scope.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 if (!FillTargetBlockScope(scope, function, component_mode.c_str(), block, 285 if (!FillTargetBlockScope(scope, function, component_mode.c_str(), block,
286 args, &block_scope, err)) 286 args, &block_scope, err))
287 return Value(); 287 return Value();
288 288
289 block->ExecuteBlockInScope(&block_scope, err); 289 block->ExecuteBlockInScope(&block_scope, err);
290 if (err->has_error()) 290 if (err->has_error())
291 return Value(); 291 return Value();
292 292
293 TargetGenerator::GenerateTarget(&block_scope, function, args, 293 TargetGenerator::GenerateTarget(&block_scope, function, args,
294 component_mode, err); 294 component_mode, err);
295
296 block_scope.CheckForUnusedVars(err);
295 return Value(); 297 return Value();
296 } 298 }
297 299
298 // copy ------------------------------------------------------------------------ 300 // copy ------------------------------------------------------------------------
299 301
300 const char kCopy[] = "copy"; 302 const char kCopy[] = "copy";
301 const char kCopy_HelpShort[] = 303 const char kCopy_HelpShort[] =
302 "copy: Declare a target that copies files."; 304 "copy: Declare a target that copies files.";
303 const char kCopy_Help[] = 305 const char kCopy_Help[] =
304 "copy: Declare a target that copies files.\n" 306 "copy: Declare a target that copies files.\n"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 Value RunTest(Scope* scope, 540 Value RunTest(Scope* scope,
539 const FunctionCallNode* function, 541 const FunctionCallNode* function,
540 const std::vector<Value>& args, 542 const std::vector<Value>& args,
541 BlockNode* block, 543 BlockNode* block,
542 Err* err) { 544 Err* err) {
543 return ExecuteGenericTarget(functions::kExecutable, scope, function, args, 545 return ExecuteGenericTarget(functions::kExecutable, scope, function, args,
544 block, err); 546 block, err);
545 } 547 }
546 548
547 } // namespace functions 549 } // namespace functions
OLDNEW
« no previous file with comments | « tools/gn/function_foreach_unittest.cc ('k') | tools/gn/functions_target_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698