| Index: tools/gn/parse_tree.cc
|
| diff --git a/tools/gn/parse_tree.cc b/tools/gn/parse_tree.cc
|
| index 00fca549b6902a1a46ceab608cd08d7a0b320e4d..59b39f36cee9d90f1f075b7e7022b62ba74b0c4a 100644
|
| --- a/tools/gn/parse_tree.cc
|
| +++ b/tools/gn/parse_tree.cc
|
| @@ -373,12 +373,16 @@ const IdentifierNode* IdentifierNode::AsIdentifier() const {
|
| }
|
|
|
| Value IdentifierNode::Execute(Scope* scope, Err* err) const {
|
| - const Value* result = scope->GetValue(value_.value(), true);
|
| - if (!result) {
|
| + const Value* value = scope->GetValue(value_.value(), true);
|
| + Value result;
|
| + if (!value) {
|
| *err = MakeErrorDescribing("Undefined identifier");
|
| - return Value();
|
| + return result;
|
| }
|
| - return *result;
|
| +
|
| + result = *value;
|
| + result.set_origin(this);
|
| + return result;
|
| }
|
|
|
| LocationRange IdentifierNode::GetRange() const {
|
|
|