diff options
Diffstat (limited to 'chromium/v8/src/torque/ls/message-handler.cc')
-rw-r--r-- | chromium/v8/src/torque/ls/message-handler.cc | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/chromium/v8/src/torque/ls/message-handler.cc b/chromium/v8/src/torque/ls/message-handler.cc index e9f2224df76..66995c0c89a 100644 --- a/chromium/v8/src/torque/ls/message-handler.cc +++ b/chromium/v8/src/torque/ls/message-handler.cc @@ -279,8 +279,9 @@ void HandleGotoDefinitionRequest(GotoDefinitionRequest request, return; } - LineAndColumn pos{request.params().position().line(), - request.params().position().character()}; + auto pos = + LineAndColumn::WithUnknownOffset(request.params().position().line(), + request.params().position().character()); if (auto maybe_definition = LanguageServerData::FindDefinition(id, pos)) { SourcePosition definition = *maybe_definition; @@ -311,22 +312,22 @@ void HandleDocumentSymbolRequest(DocumentSymbolRequest request, DCHECK(symbol->IsUserDefined()); if (symbol->IsMacro()) { Macro* macro = Macro::cast(symbol); - SymbolInformation symbol = response.add_result(); - symbol.set_name(macro->ReadableName()); - symbol.set_kind(SymbolKind::kFunction); - symbol.location().SetTo(macro->Position()); + SymbolInformation info = response.add_result(); + info.set_name(macro->ReadableName()); + info.set_kind(SymbolKind::kFunction); + info.location().SetTo(macro->Position()); } else if (symbol->IsBuiltin()) { Builtin* builtin = Builtin::cast(symbol); - SymbolInformation symbol = response.add_result(); - symbol.set_name(builtin->ReadableName()); - symbol.set_kind(SymbolKind::kFunction); - symbol.location().SetTo(builtin->Position()); + SymbolInformation info = response.add_result(); + info.set_name(builtin->ReadableName()); + info.set_kind(SymbolKind::kFunction); + info.location().SetTo(builtin->Position()); } else if (symbol->IsGenericCallable()) { GenericCallable* generic = GenericCallable::cast(symbol); - SymbolInformation symbol = response.add_result(); - symbol.set_name(generic->name()); - symbol.set_kind(SymbolKind::kFunction); - symbol.location().SetTo(generic->Position()); + SymbolInformation info = response.add_result(); + info.set_name(generic->name()); + info.set_kind(SymbolKind::kFunction); + info.location().SetTo(generic->Position()); } else if (symbol->IsTypeAlias()) { const Type* type = TypeAlias::cast(symbol)->type(); SymbolKind kind = |