forked from qt-creator/qt-creator
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:
@@ -65,6 +65,11 @@ QStringList CompilerOptionsBuilder::build(CppTools::ProjectFile::Kind fileKind,
|
||||
return QStringList(););
|
||||
}
|
||||
|
||||
if (fileKind == ProjectFile::CXXHeader || fileKind == ProjectFile::CXXSource) {
|
||||
QTC_ASSERT(m_projectPart.languageVersion > ProjectExplorer::LanguageVersion::LatestC,
|
||||
return QStringList(););
|
||||
}
|
||||
|
||||
add("-c");
|
||||
|
||||
addWordWidth();
|
||||
|
Reference in New Issue
Block a user