CppTools: merge CompilerOptionsBuilder with Clang one

Since it's never used for other compilers.

Change-Id: I9512692d1dc9f9a701ea2453b7d50005478bed5d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Ivan Donchevskii
2017-09-27 10:32:52 +02:00
parent f19facd378
commit b10f8484c7
16 changed files with 176 additions and 287 deletions

View File

@@ -33,7 +33,7 @@
#include <clangrefactoringmessages.h>
#include <cpptools/clangcompileroptionsbuilder.h>
#include <cpptools/compileroptionsbuilder.h>
#include <cpptools/projectpart.h>
#include <utils/smallstringvector.h>
@@ -45,7 +45,7 @@ namespace {
using testing::_;
using CppTools::ClangCompilerOptionsBuilder;
using CppTools::CompilerOptionsBuilder;
using ClangBackEnd::RequestSourceLocationsForRenamingMessage;
@@ -126,12 +126,10 @@ void RefactoringEngine::SetUp()
projectPart = CppTools::ProjectPart::Ptr(new CppTools::ProjectPart);
projectPart->files.push_back(projectFile);
ClangCompilerOptionsBuilder clangCOBuilder(*projectPart,
CLANG_VERSION,
CLANG_RESOURCE_DIR);
commandLine = Utils::SmallStringVector(clangCOBuilder.build(
CompilerOptionsBuilder optionsBuilder(*projectPart, CLANG_VERSION, CLANG_RESOURCE_DIR);
commandLine = Utils::SmallStringVector(optionsBuilder.build(
projectFile.kind,
CppTools::CompilerOptionsBuilder::PchUsage::None));
CompilerOptionsBuilder::PchUsage::None));
commandLine.push_back(qStringFilePath);
}