ClangCodeModel: Support access type categorization

... with "Find Usages", as we do in the built-in code model.
Note 1: This is very slow, so it's for now only enabled if the
        search results come from a small number of files.
        Possible ways of speeding up the operation
        to be investigated.
Note 2: All test cases from the old code model also pass here,
        but checking with non-trivial real-world projects
        shows a lot of mis-categorizations.
        Well will fix them one by one.
Note 3: This functionality requires clangd >= 13.

Change-Id: Ib3500b52996dbbf9d7d9712d729179bcbd3262fc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-04-21 14:29:49 +02:00
parent 11f574fef9
commit 6dc3c1f156
19 changed files with 1042 additions and 29 deletions

View File

@@ -8,6 +8,7 @@ QtcPlugin {
Depends { name: "Core" }
Depends { name: "CppTools" }
Depends { name: "ProjectExplorer" }
Depends { name: "QtSupport"; condition: qtc.testsEnabled }
Depends { name: "TextEditor" }
Depends { name: "Utils" }
Depends { name: "ClangSupport" }
@@ -114,6 +115,8 @@ QtcPlugin {
"clangbatchfileprocessor.h",
"clangcodecompletion_test.cpp",
"clangcodecompletion_test.h",
"clangdtests.cpp",
"clangdtests.h",
"data/clangtestdata.qrc",
]
}