diff options
author | Ivan Donchevskii <[email protected]> | 2018-06-01 10:46:20 +0200 |
---|---|---|
committer | Ivan Donchevskii <[email protected]> | 2018-06-04 08:48:33 +0000 |
commit | 4e4bd4909af55dbb716fae061244eae5577b4054 (patch) | |
tree | 13899e2b854fb0aaf829f8aace69bbaadf0f1a03 /src/plugins/clangcodemodel/clangbackendreceiver.cpp | |
parent | 52bd5173fbf00428698368d4cf19bb2bf4b0332a (diff) |
Clang: Use follow symbol result from clang when global fails
When built-in code model fails to follow symbol under cursor
fall back to the clang result even if it only follows
to the decalration.
Change-Id: I22d8c5fee6ab7594b1d1b7ce8104414db28383c7
Reviewed-by: Nikolai Kosjar <[email protected]>
Diffstat (limited to 'src/plugins/clangcodemodel/clangbackendreceiver.cpp')
-rw-r--r-- | src/plugins/clangcodemodel/clangbackendreceiver.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/clangcodemodel/clangbackendreceiver.cpp b/src/plugins/clangcodemodel/clangbackendreceiver.cpp index 6cb6bafea12..b957ff1b08e 100644 --- a/src/plugins/clangcodemodel/clangbackendreceiver.cpp +++ b/src/plugins/clangcodemodel/clangbackendreceiver.cpp @@ -255,7 +255,7 @@ static CppTools::SymbolInfo toSymbolInfo(const FollowSymbolMessage &message) { CppTools::SymbolInfo result; - const SourceRangeContainer &range = message.sourceRange; + const SourceRangeContainer &range = message.result.range; const SourceLocationContainer &start = range.start; const SourceLocationContainer &end = range.end; @@ -265,6 +265,8 @@ CppTools::SymbolInfo toSymbolInfo(const FollowSymbolMessage &message) result.endColumn = static_cast<int>(end.column); result.fileName = start.filePath; + result.isPureDeclarationForUsage = message.result.isPureDeclarationForUsage; + return result; } @@ -354,7 +356,7 @@ void BackendReceiver::tooltip(const ToolTipMessage &message) void BackendReceiver::followSymbol(const ClangBackEnd::FollowSymbolMessage &message) { qCDebugIpc() << "FollowSymbolMessage with" - << message.sourceRange << "range"; + << message.result; const quint64 ticket = message.ticketNumber; QFutureInterface<CppTools::SymbolInfo> futureInterface = m_followTable.take(ticket); |