Clang: Provide the language option to the backend

Provide the language option (e.g. "-x c++-header") when registering a
translation unit for the editor.

Task-number: QTCREATORBUG-14787
Change-Id: Ie06f9fdab302f1b21ba72cdb65b6aabf9f7bc04c
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2015-11-05 13:57:57 +01:00
parent 08fcb7f317
commit 23fa5a7efd
21 changed files with 228 additions and 37 deletions

View File

@@ -948,7 +948,12 @@ ProjectPart::Ptr CppModelManager::fallbackProjectPart() const
part->projectDefines = d->m_definedMacros;
part->headerPaths = d->m_headerPaths;
part->languageVersion = ProjectPart::CXX14;
// Do not activate ObjectiveCExtensions since this will lead to the
// "objective-c++" language option for a project-less *.cpp file.
part->languageExtensions = ProjectPart::AllExtensions;
part->languageExtensions &= ~ProjectPart::ObjectiveCExtensions;
part->qtVersion = ProjectPart::Qt5;
part->updateLanguageFeatures();