From 2d8bc0e509a5dbb7314ea12eeb7a28acc13d82cd Mon Sep 17 00:00:00 2001 From: Ivan Donchevskii Date: Mon, 21 Jan 2019 08:33:03 +0100 Subject: [PATCH] Clang: Do not QTC_ASSERT when file kind is not set We do not set file kind when building an initial command line for libclang and this assert triggers all the time. Change-Id: If607cf68ca5bcd788abe77875787bed24db57573 Reviewed-by: Nikolai Kosjar --- src/plugins/cpptools/compileroptionsbuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp index 426a96b5342..c7219465939 100644 --- a/src/plugins/cpptools/compileroptionsbuilder.cpp +++ b/src/plugins/cpptools/compileroptionsbuilder.cpp @@ -357,7 +357,7 @@ void CompilerOptionsBuilder::updateFileLanguage(ProjectFile::Kind fileKind) else if (ProjectFile::isCxx(fileKind)) option = "/TP"; else - QTC_ASSERT(false && "File kind not supported by cl driver mode", return;); + return; // Do not add anything if we haven't set a file kind yet. int langOptIndex = m_options.indexOf("/TC"); if (langOptIndex == -1)