Skip to content
Snippets Groups Projects
Commit 90f94363 authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

Clang: Extract TranslationUnitCore and (re)parse explicitly


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>
parent dc734f45
Branches
Tags
No related merge requests found
Showing
with 795 additions and 438 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment