diff options
author | Vyacheslav Pukhanov <vyacheslav@pukhanov.ru> | 2021-03-17 21:19:13 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-18 07:49:18 +0100 |
commit | 663fd9abb44d2181f5845f70e374e748d16b60cd (patch) | |
tree | 934c7cacf684dffeca471324b88a7ae42440e5de /Userland | |
parent | 0b5d414eba2758be6cf8400c857904ea6dff3366 (diff) | |
download | serenity-663fd9abb44d2181f5845f70e374e748d16b60cd.zip |
CppLanguageServer: Make preprocessor ignore unsupported keywords
During typing the entered keywords can be incomplete and crash
preprocessor. We enable the newly introduced option to prevent
that crash.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp index 60351f11ea..1cfb7bf10b 100644 --- a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp +++ b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp @@ -426,6 +426,7 @@ OwnPtr<ParserAutoComplete::DocumentData> ParserAutoComplete::create_document_dat document_data->m_filename = move(filename); document_data->m_text = move(text); document_data->m_preprocessor = make<Preprocessor>(document_data->m_filename, document_data->text()); + document_data->preprocessor().set_ignore_unsupported_keywords(true); document_data->preprocessor().process(); Preprocessor::Definitions all_definitions; |