Clang: Use full paths in compilation database for symbol collector

We we FilePath and NativeFilePath so that compiler warns us if we mix them
up.

Change-Id: I33d7abc7e4e724dff2a9b2b9b23deea8b358ccfd
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Ivan Donchevskii
2019-01-31 10:30:58 +01:00
parent 874dde6863
commit dd778bcb23
27 changed files with 355 additions and 304 deletions

View File

@@ -62,10 +62,9 @@ void RefactoringServer::requestSourceLocationsForRenamingMessage(RequestSourceLo
{
SymbolFinder symbolFinder(message.line, message.column, m_filePathCache);
symbolFinder.addFile(std::string(message.filePath.directory()),
std::string(message.filePath.name()),
std::string(message.unsavedContent),
std::vector<std::string>(message.commandLine));
symbolFinder.addFile(std::move(message.filePath),
std::move(message.unsavedContent),
std::move(message.commandLine));
symbolFinder.findSymbol();
@@ -79,10 +78,9 @@ void RefactoringServer::requestSourceRangesAndDiagnosticsForQueryMessage(
{
ClangQuery clangQuery(m_filePathCache, message.takeQuery());
clangQuery.addFile(std::string(message.source.filePath.directory()),
std::string(message.source.filePath.name()),
std::string(message.source.unsavedFileContent),
std::vector<std::string>(message.source.commandLineArguments));
clangQuery.addFile(std::move(message.source.filePath),
std::move(message.source.unsavedFileContent),
std::move(message.source.commandLineArguments));
clangQuery.findLocations();