forked from qt-creator/qt-creator
Utils: Convert to SmallStringView for comparison
Change-Id: I38d9716225b81091e8e75b26c9c2258a2aefa987 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -50,10 +50,10 @@ ClangQueryGatherer::createSourceRangesForSource(
|
||||
{
|
||||
ClangQuery clangQuery(*filePathCache, std::move(query));
|
||||
|
||||
clangQuery.addFile(source.filePath().directory(),
|
||||
source.filePath().name(),
|
||||
source.takeUnsavedFileContent(),
|
||||
source.takeCommandLineArguments());
|
||||
clangQuery.addFile(std::string(source.filePath().directory()),
|
||||
std::string(source.filePath().name()),
|
||||
std::string(source.takeUnsavedFileContent()),
|
||||
std::vector<std::string>(source.takeCommandLineArguments()));
|
||||
|
||||
clangQuery.addUnsavedFiles(unsaved);
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ void ClangTool::addFiles(const Container &filePaths,
|
||||
auto fileNameBegin = found.base();
|
||||
|
||||
std::vector<std::string> commandLine(arguments.begin(), arguments.end());
|
||||
commandLine.push_back(filePath);
|
||||
commandLine.push_back(std::string(filePath));
|
||||
|
||||
addFile({filePath.begin(), std::prev(fileNameBegin)},
|
||||
{fileNameBegin, filePath.end()},
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
|
||||
std::string takeSymbolName()
|
||||
{
|
||||
return std::move(symbolName);
|
||||
return std::string(symbolName);
|
||||
}
|
||||
|
||||
std::vector<USRName> takeUnifiedSymbolResolutions()
|
||||
|
||||
@@ -56,10 +56,10 @@ void RefactoringServer::requestSourceLocationsForRenamingMessage(RequestSourceLo
|
||||
{
|
||||
SymbolFinder symbolFinder(message.line(), message.column());
|
||||
|
||||
symbolFinder.addFile(message.filePath().directory(),
|
||||
message.filePath().name(),
|
||||
message.unsavedContent(),
|
||||
message.commandLine());
|
||||
symbolFinder.addFile(std::string(message.filePath().directory()),
|
||||
std::string(message.filePath().name()),
|
||||
std::string(message.unsavedContent()),
|
||||
std::vector<std::string>(message.commandLine()));
|
||||
|
||||
symbolFinder.findSymbol();
|
||||
|
||||
@@ -73,10 +73,10 @@ void RefactoringServer::requestSourceRangesAndDiagnosticsForQueryMessage(
|
||||
{
|
||||
ClangQuery clangQuery(m_filePathCache, message.takeQuery());
|
||||
|
||||
clangQuery.addFile(message.source().filePath().directory(),
|
||||
message.source().filePath().name(),
|
||||
message.source().unsavedFileContent(),
|
||||
message.source().commandLineArguments());
|
||||
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.findLocations();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user