forked from qt-creator/qt-creator
Clang: Clean up CompilerOptionsBuilder
No behavior change. * Remove virtual from methods that are not overridden * Move constant member functions that do no access any members into source file as static functions * Remove QLatin1String where possible * Make variable names a bit more consistent * Other minor stuff Change-Id: I34a582d5a468489e11365507b283e9aee157664f Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -189,7 +189,7 @@ private:
|
||||
static AnalyzeUnits toAnalyzeUnits(const FileInfos &fileInfos)
|
||||
{
|
||||
AnalyzeUnits unitsToAnalyze;
|
||||
const CompilerOptionsBuilder::PchUsage pchUsage = CppTools::getPchUsage();
|
||||
const UsePrecompiledHeaders usePrecompiledHeaders = CppTools::getPchUsage();
|
||||
for (const FileInfo &fileInfo : fileInfos) {
|
||||
CompilerOptionsBuilder optionsBuilder(*fileInfo.projectPart,
|
||||
CppTools::UseSystemHeader::No,
|
||||
@@ -198,7 +198,7 @@ static AnalyzeUnits toAnalyzeUnits(const FileInfos &fileInfos)
|
||||
QString(CLANG_VERSION),
|
||||
QString(CLANG_RESOURCE_DIR));
|
||||
QStringList arguments = extraClangToolsPrependOptions();
|
||||
arguments.append(optionsBuilder.build(fileInfo.kind, pchUsage));
|
||||
arguments.append(optionsBuilder.build(fileInfo.kind, usePrecompiledHeaders));
|
||||
arguments.append(extraClangToolsAppendOptions());
|
||||
unitsToAnalyze << AnalyzeUnit(fileInfo.file.toString(), arguments);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user