summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2014-12-02 18:27:05 +0100
committerNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2014-12-03 10:00:40 +0100
commitd850485f0624eaf6ea756e0c941d2722df8b3e02 (patch)
tree9269e45c8146426b35f8934ed0ad31f523d636e0
parente8ea09cc32d0f07b5bdada2f4d5e5ddd7a3ceae0 (diff)
downloadqt-creator-d850485f0624eaf6ea756e0c941d2722df8b3e02.tar.gz
ClangCodeModel: Fix re-parsing with new options
If the command line options changed unload the unit so the next SemanticMarker::reparse() will call clang_parseTranslationUnit() with the new options. Task-number: QTCREATORBUG-11606 Change-Id: I44e3da97850abd875a88abde0b406b14198b5be8 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
-rw-r--r--src/plugins/clangcodemodel/semanticmarker.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/clangcodemodel/semanticmarker.cpp b/src/plugins/clangcodemodel/semanticmarker.cpp
index 7e5661d31c..0d7c6946fd 100644
--- a/src/plugins/clangcodemodel/semanticmarker.cpp
+++ b/src/plugins/clangcodemodel/semanticmarker.cpp
@@ -83,6 +83,7 @@ void SemanticMarker::setCompilationOptions(const QStringList &options)
return;
m_unit->setCompilationOptions(options);
+ m_unit->unload();
}
void SemanticMarker::reparse(const UnsavedFiles &unsavedFiles)