Clang: Make file ids unique

Clang file ids are only unique for one query. Because we query in parallel
we have to manage our own unique ids.

Change-Id: I67d57d8b1766cab75ad252a14e57bbf9dc5fdb79
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tim Jenssen
2017-07-03 11:12:00 +02:00
parent 35ca318d18
commit dae4477cd3
27 changed files with 231 additions and 159 deletions

View File

@@ -37,6 +37,7 @@
#include <QCoreApplication>
#include <functional>
#include <atomic>
namespace ClangBackEnd {
@@ -125,7 +126,7 @@ void RefactoringServer::gatherSourceRangesAndDiagnosticsForQueryMessages(
uint freeProcessors = std::thread::hardware_concurrency();
#endif
m_gatherer = ClangQueryGatherer(std::move(sources), std::move(unsaved), std::move(query));
m_gatherer = ClangQueryGatherer(&m_filePathCache, std::move(sources), std::move(unsaved), std::move(query));
m_gatherer.setProcessingSlotCount(freeProcessors);
m_pollTimer.start();