mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 15:45:08 +00:00
Fix another threading crash
This commit is contained in:
parent
337c1f0b12
commit
f263524b19
@ -14,6 +14,7 @@
|
|||||||
#include "typed_bidi_message_queue.h"
|
#include "typed_bidi_message_queue.h"
|
||||||
#include "working_files.h"
|
#include "working_files.h"
|
||||||
|
|
||||||
|
#include <clang-c/Index.h>
|
||||||
#include <doctest/doctest.h>
|
#include <doctest/doctest.h>
|
||||||
#include <rapidjson/istreamwrapper.h>
|
#include <rapidjson/istreamwrapper.h>
|
||||||
#include <rapidjson/ostreamwrapper.h>
|
#include <rapidjson/ostreamwrapper.h>
|
||||||
@ -1512,6 +1513,10 @@ void LanguageServerMain(std::string process_name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
|
clang_enableStackTraces();
|
||||||
|
clang_toggleCrashRecovery(1);
|
||||||
|
|
||||||
|
|
||||||
//bool loop = true;
|
//bool loop = true;
|
||||||
//while (loop)
|
//while (loop)
|
||||||
// std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
// std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||||
|
@ -1437,10 +1437,6 @@ void indexEntityReference(CXClientData client_data,
|
|||||||
|
|
||||||
std::vector<std::unique_ptr<IndexedFile>> Parse(FileConsumer::SharedState* file_consumer_shared, std::string filename, std::vector<std::string> args, bool dump_ast) {
|
std::vector<std::unique_ptr<IndexedFile>> Parse(FileConsumer::SharedState* file_consumer_shared, std::string filename, std::vector<std::string> args, bool dump_ast) {
|
||||||
filename = NormalizePath(filename);
|
filename = NormalizePath(filename);
|
||||||
//return {};
|
|
||||||
|
|
||||||
clang_enableStackTraces();
|
|
||||||
clang_toggleCrashRecovery(1);
|
|
||||||
|
|
||||||
clang::Index index(0 /*excludeDeclarationsFromPCH*/,
|
clang::Index index(0 /*excludeDeclarationsFromPCH*/,
|
||||||
0 /*displayDiagnostics*/);
|
0 /*displayDiagnostics*/);
|
||||||
|
Loading…
Reference in New Issue
Block a user