diff --git a/src/command_line.cc b/src/command_line.cc index a5e66de9..f9309776 100644 --- a/src/command_line.cc +++ b/src/command_line.cc @@ -14,6 +14,7 @@ #include "typed_bidi_message_queue.h" #include "working_files.h" +#include #include #include #include @@ -1512,6 +1513,10 @@ void LanguageServerMain(std::string process_name) { } int main(int argc, char** argv) { + clang_enableStackTraces(); + clang_toggleCrashRecovery(1); + + //bool loop = true; //while (loop) // std::this_thread::sleep_for(std::chrono::milliseconds(10)); diff --git a/src/indexer.cc b/src/indexer.cc index 4d9dce16..ad710c44 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -1437,10 +1437,6 @@ void indexEntityReference(CXClientData client_data, std::vector> Parse(FileConsumer::SharedState* file_consumer_shared, std::string filename, std::vector args, bool dump_ast) { filename = NormalizePath(filename); - //return {}; - - clang_enableStackTraces(); - clang_toggleCrashRecovery(1); clang::Index index(0 /*excludeDeclarationsFromPCH*/, 0 /*displayDiagnostics*/);