summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/builtinindexingsupport.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2017-01-12 18:01:12 +0100
committerNikolai Kosjar <nikolai.kosjar@qt.io>2017-01-16 10:17:50 +0000
commite4e65726614fa4e3ee02f25db755d959850441ea (patch)
treea76a4aab899eb313f25f0da8a1f3e89ede71b67b /src/plugins/cpptools/builtinindexingsupport.cpp
parent4416eecc024e155438c7ed6399182dbff143bd0d (diff)
downloadqt-creator-e4e65726614fa4e3ee02f25db755d959850441ea.tar.gz
CppTools: Allow interpreting ambiguous headers as C headers
...instead of C++ headers. For the Clang Code Model this results in using "-x c-header" instead of "-x c++-header". This introduces a new option in Options > C++ > "Code Model" to configure this. Change-Id: I8a0ce8fa6155f5ef58743ebc7f1d0b500fbf6599 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'src/plugins/cpptools/builtinindexingsupport.cpp')
-rw-r--r--src/plugins/cpptools/builtinindexingsupport.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/cpptools/builtinindexingsupport.cpp b/src/plugins/cpptools/builtinindexingsupport.cpp
index c4360f5fd7..6d3eac843b 100644
--- a/src/plugins/cpptools/builtinindexingsupport.cpp
+++ b/src/plugins/cpptools/builtinindexingsupport.cpp
@@ -158,7 +158,8 @@ void indexFindErrors(QFutureInterface<void> &future, const ParseParams params)
// Parse the file as precisely as possible
BuiltinEditorDocumentParser parser(file);
parser.setReleaseSourceAndAST(false);
- parser.update({CppModelManager::instance()->workingCopy(), nullptr, false});
+ parser.update({CppModelManager::instance()->workingCopy(), nullptr,
+ Language::Cxx, false});
CPlusPlus::Document::Ptr document = parser.document();
QTC_ASSERT(document, return);