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 <nikolai.kosjar@qt.io>
This commit is contained in:
Ivan Donchevskii
2019-01-21 08:33:03 +01:00
parent 1d3d18a969
commit 2d8bc0e509

View File

@@ -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)