1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:57:45 +00:00

LanguageServers/Cpp: Don't VERIFY that a file could be found

... when creating a new DocumentData
This commit is contained in:
Itamar 2021-02-26 21:27:08 +02:00 committed by Andreas Kling
parent 477e13f6c5
commit e20cd1d8db

View file

@ -60,7 +60,8 @@ const ParserAutoComplete::DocumentData& ParserAutoComplete::get_document_data(co
OwnPtr<ParserAutoComplete::DocumentData> ParserAutoComplete::create_document_data_for(const String& file)
{
auto document = filedb().get(file);
VERIFY(document);
if (!document)
return {};
auto content = document->text();
auto document_data = make<DocumentData>(document->text(), file);
auto root = document_data->parser.parse();