Skip to content
  • Nikolai Kosjar's avatar
    Clang: Extract TranslationUnitCore and (re)parse explicitly · 90f94363
    Nikolai Kosjar authored
    
    
    Extract TranslationUnitCore, which is the API for the high-level
    operations we need. TranslationUnit does not call any clang_* functions
    anymore, except the one needed for disposing the CXTranslationUnit - for
    now, we keep TranslationUnit the owner of TranslationUnitCore.
    
    TranslationUnitCore will be passed on to the worker threads.
    
    With this, the current "TranslationUnit" looses its meaning. We will
    rename it to "Document" in a follow-up change.
    
                                ***
    
    TranslationUnit::cxTranslationUnit does not implicitly
    creates/parses/reparses anymore. We use more verbose update operations
    now.
    
    The test ClangIpcServer.GetCodeCompletionDependingOnArgumets fails now
    because of this - CodeCompleter::completeHelper() does not recreate the
    translation unit anymore, thus working on the old data.
    
    This will be addressed in a follow-up change.
    
    Change-Id: I6213d6f1609cd3c9a54666c84cb8b623b2fefe1c
    Reviewed-by: default avatarTim Jenssen <tim.jenssen@qt.io>
    90f94363