mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +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
Notes:
sideshowbarker
2024-07-18 21:41:39 +09:00
Author: https://github.com/itamar8910
Commit: 3f0ace6670
Pull-request: https://github.com/SerenityOS/serenity/pull/5654
Issue: https://github.com/SerenityOS/serenity/issues/5569
Issue: https://github.com/SerenityOS/serenity/issues/5574
Issue: https://github.com/SerenityOS/serenity/issues/5634
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