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

Unified Diff: tools/gn/parse_tree.cc

Issue 547063004: Allow GN template collisions if they're the same. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/gn/scope.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/parse_tree.cc
diff --git a/tools/gn/parse_tree.cc b/tools/gn/parse_tree.cc
index 59b39f36cee9d90f1f075b7e7022b62ba74b0c4a..c4f78b7ce0768f9f7e7d025d112e1e25c7c31930 100644
--- a/tools/gn/parse_tree.cc
+++ b/tools/gn/parse_tree.cc
@@ -340,6 +340,8 @@ Value FunctionCallNode::Execute(Scope* scope, Err* err) const {
}
LocationRange FunctionCallNode::GetRange() const {
+ if (function_.type() == Token::INVALID)
+ return LocationRange(); // This will be null in some tests.
if (block_)
return function_.range().Union(block_->GetRange());
return function_.range().Union(args_->GetRange());
« no previous file with comments | « no previous file | tools/gn/scope.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698