forked from qt-creator/qt-creator
CppEditor: Use "-I<dir>" format rather than "-I <dir>"
... when constructing the compiler command line. This works around a command line parsing bug in clangd 15.0.0 (https://github.com/clangd/clangd/issues/1292). Change-Id: I7c2e7f443bfededf12db985ff5142f39035d9db6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -334,7 +334,7 @@ void CompilerOptionsBuilder::insertWrappedHeaders(const QStringList &relPaths)
|
|||||||
static const QString baseDir = creatorResourcePath() + "/cplusplus";
|
static const QString baseDir = creatorResourcePath() + "/cplusplus";
|
||||||
const QString fullPath = baseDir + '/' + relPath;
|
const QString fullPath = baseDir + '/' + relPath;
|
||||||
QTC_ASSERT(QDir(fullPath).exists(), continue);
|
QTC_ASSERT(QDir(fullPath).exists(), continue);
|
||||||
args << includeUserPathOption << QDir::toNativeSeparators(fullPath);
|
args << (includeUserPathOption + QDir::toNativeSeparators(fullPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
const int index = m_options.indexOf(QRegularExpression("\\A-I.*\\z"));
|
const int index = m_options.indexOf(QRegularExpression("\\A-I.*\\z"));
|
||||||
@@ -683,7 +683,7 @@ void CompilerOptionsBuilder::addIncludeDirOptionForPath(const HeaderPath &path)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
add({includeUserPathOption, QDir::toNativeSeparators(path.path)});
|
add(includeUserPathOption + QDir::toNativeSeparators(path.path));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CompilerOptionsBuilder::excludeDefineDirective(const Macro ¯o) const
|
bool CompilerOptionsBuilder::excludeDefineDirective(const Macro ¯o) const
|
||||||
|
Reference in New Issue
Block a user