Clang: Check that file kind matches the language version

It was checked that pure C header and source files had proper
language version but not another way around.

Change-Id: I1eaf41f342731bdbe30ee73e81144334d0f15d19
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-10-31 12:06:08 +01:00
parent cb9df98efb
commit b97d4c2f80

View File

@@ -65,6 +65,11 @@ QStringList CompilerOptionsBuilder::build(CppTools::ProjectFile::Kind fileKind,
return QStringList();); return QStringList(););
} }
if (fileKind == ProjectFile::CXXHeader || fileKind == ProjectFile::CXXSource) {
QTC_ASSERT(m_projectPart.languageVersion > ProjectExplorer::LanguageVersion::LatestC,
return QStringList(););
}
add("-c"); add("-c");
addWordWidth(); addWordWidth();