void ClangEditorDocumentProcessor::updateProjectPartAndTranslationUnitForEditor()
{
    const CppTools::ProjectPart::Ptr projectPart = m_parser->projectPart();
    QTC_ASSERT(projectPart, return);

    updateTranslationUnitForEditor(*projectPart.data());
    requestDiagnostics(*projectPart.data());

    m_projectPart = projectPart;
}
void ClangEditorDocumentProcessor::updateProjectPartAndTranslationUnitForEditor()
{
    const CppTools::ProjectPart::Ptr projectPart = m_parser->projectPart();

    if (isProjectPartLoadedOrIsFallback(projectPart)) {
        updateTranslationUnitForEditor(projectPart.data());
        requestDiagnostics(projectPart.data());

        m_projectPart = projectPart;
    }
}