diff --git a/src/plugins/clangcodemodel/clangfollowsymbol.cpp b/src/plugins/clangcodemodel/clangfollowsymbol.cpp index 96df23ab20a..f1113de164d 100644 --- a/src/plugins/clangcodemodel/clangfollowsymbol.cpp +++ b/src/plugins/clangcodemodel/clangfollowsymbol.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -183,12 +184,22 @@ void ClangFollowSymbol::findLink(const CppTools::CursorInEditor &data, return processLinkCallback(Utils::Link()); if (!resolveTarget) { - processLinkCallback(linkAtCursor(cursor, - data.filePath().toString(), - static_cast(line), - static_cast(column), - processor)); - return; + Utils::Link link = linkAtCursor(cursor, + data.filePath().toString(), + static_cast(line), + static_cast(column), + processor); + if (link == Utils::Link()) { + CppTools::FollowSymbolUnderCursor followSymbol; + return followSymbol.findLink(data, + std::move(processLinkCallback), + false, + snapshot, + documentFromSemanticInfo, + symbolFinder, + inNextSplit); + } + return processLinkCallback(link); } QFuture infoFuture