ClangCodeModel: Use more suitable location for compile_commands.json

... for clangd.
Putting it in the build directory seems sensible in principle, but that
can be problematic for in-source builds. So introduce another level of
nesting to prevent conflicts.

Fixes: QTCREATORBUG-26431
Change-Id: Id66aa0852d206695f2fc2ec42292b1cecefe2b59
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-10-15 16:24:25 +02:00
parent 71e6e30dbf
commit 19119b9533
4 changed files with 10 additions and 13 deletions

View File

@@ -88,8 +88,8 @@ public:
enum class CompilationDbPurpose { Project, CodeModel };
GenerateCompilationDbResult generateCompilationDB(const CppEditor::ProjectInfo::ConstPtr projectInfo,
CompilationDbPurpose purpose, const CppEditor::ClangDiagnosticConfig &warningsConfig,
const QStringList &projectOptions);
const Utils::FilePath &baseDir, CompilationDbPurpose purpose,
const CppEditor::ClangDiagnosticConfig &warningsConfig, const QStringList &projectOptions);
class DiagnosticTextInfo
{