mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:07:34 +00:00
LanguageServers/Cpp: Allow the creation of DocumentData objects to fail
This fixes langauge-server crashes when trying to parse non-existant header files, such as #include <new>. Closes #5569.
This commit is contained in:
parent
a2ac86f5e1
commit
3f0ace6670
2 changed files with 19 additions and 8 deletions
|
@ -76,8 +76,8 @@ private:
|
|||
Vector<PropertyInfo> properties_of_type(const DocumentData& document, const String& type) const;
|
||||
NonnullRefPtrVector<Declaration> get_declarations_in_outer_scope_including_headers(const DocumentData& document) const;
|
||||
|
||||
const DocumentData& get_document_data(const String& file) const;
|
||||
const DocumentData& get_or_create_document_data(const String& file);
|
||||
const DocumentData* get_document_data(const String& file) const;
|
||||
const DocumentData* get_or_create_document_data(const String& file);
|
||||
void set_document_data(const String& file, OwnPtr<DocumentData>&& data);
|
||||
|
||||
OwnPtr<DocumentData> create_document_data_for(const String& file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue