Skip to content

Commit 663fd9a

Browse files
vpukhanovawesomekling
authored andcommitted
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.
1 parent 0b5d414 commit 663fd9a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ OwnPtr<ParserAutoComplete::DocumentData> ParserAutoComplete::create_document_dat
426426
document_data->m_filename = move(filename);
427427
document_data->m_text = move(text);
428428
document_data->m_preprocessor = make<Preprocessor>(document_data->m_filename, document_data->text());
429+
document_data->preprocessor().set_ignore_unsupported_keywords(true);
429430
document_data->preprocessor().process();
430431

431432
Preprocessor::Definitions all_definitions;

0 commit comments

Comments
 (0)