forked from qt-creator/qt-creator
Clang: Extend ClangTool and CommandLineBuilder
We now support source file and not only header files and the file path is now automatically added to the end. This removes quite some clutter. Change-Id: I74eabd262e6c7e5f4d523e3a3cd194bd3efe1ef3 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
committed by
Marco Bubke
parent
d6a6d356bb
commit
7fe65851d9
@@ -107,6 +107,7 @@ void SymbolIndexer::updateProjectPart(ProjectPartContainer &&projectPart)
|
||||
using Builder = CommandLineBuilder<ProjectPartContainer, Utils::SmallStringVector>;
|
||||
Builder commandLineBuilder{projectPart,
|
||||
projectPart.toolChainArguments,
|
||||
InputFileType::Source,
|
||||
{},
|
||||
{},
|
||||
optionalProjectPartPch
|
||||
@@ -181,8 +182,8 @@ void SymbolIndexer::updateChangedPath(FilePathId filePathId,
|
||||
|
||||
auto pchPath = optionalProjectPartPch ? optionalProjectPartPch.value().pchPath : FilePath{};
|
||||
|
||||
CommandLineBuilder<ProjectPartArtefact, Utils::SmallStringVector> builder{
|
||||
artefact, artefact.toolChainArguments, {}, {}, pchPath};
|
||||
CommandLineBuilder<ProjectPartArtefact, Utils::SmallStringVector>
|
||||
builder{artefact, artefact.toolChainArguments, InputFileType::Source, {}, {}, pchPath};
|
||||
|
||||
auto indexing = [projectPartId = artefact.projectPartId, arguments=builder.commandLine, filePathId, this](
|
||||
SymbolsCollectorInterface &symbolsCollector) {
|
||||
|
||||
Reference in New Issue
Block a user