From d850485f0624eaf6ea756e0c941d2722df8b3e02 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Tue, 2 Dec 2014 18:27:05 +0100 Subject: [PATCH] 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 Reviewed-by: Erik Verbruggen --- src/plugins/clangcodemodel/semanticmarker.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/clangcodemodel/semanticmarker.cpp b/src/plugins/clangcodemodel/semanticmarker.cpp index 7e5661d31cb..0d7c6946fd2 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)