ClangCodeModel: Try harder to find out whether a function is virtual

... when following symbols with clangd.
The textdocument/implementation request is expensive, so we'd like to
make sure we only run it if we are sure that we're really dealing with a
virtual function. We re-use the information gathered during highlighting
for this purpose.

Change-Id: Id92a9a92fe2ac7fd5acf903a9ade711223ee401b
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-10-28 11:59:48 +02:00
parent b403258c87
commit 4fe5be2565
2 changed files with 55 additions and 2 deletions

View File

@@ -35,6 +35,7 @@
namespace Core { class SearchResultItem; }
namespace CppEditor { class CppEditorWidget; }
namespace LanguageServerProtocol { class Range; }
namespace ProjectExplorer { class Project; }
namespace TextEditor { class BaseTextEditor; }
@@ -76,6 +77,9 @@ public:
const LanguageServerProtocol::HoverRequest::Response &hoverResponse,
const LanguageServerProtocol::DocumentUri &uri);
void setVirtualRanges(const Utils::FilePath &filePath,
const QList<LanguageServerProtocol::Range> &ranges, int revision);
void enableTesting();
bool testingEnabled() const;