Merge remote-tracking branch 'origin/7.0'

Change-Id: Ib2267ddbb702564a6e1c8f6b1db802bc9c45759d
This commit is contained in:
Eike Ziller
2022-03-31 15:32:42 +02:00
26 changed files with 324 additions and 80 deletions

View File

@@ -2093,7 +2093,10 @@ void ClangdClient::findLocalUsages(TextDocument *document, const QTextCursor &cu
const QList<AstNode> astPath = getAstPath(ast, linkPos);
bool isVar = false;
for (auto it = astPath.rbegin(); it != astPath.rend(); ++it) {
if (it->role() == "declaration" && it->kind() == "Function") {
if (it->role() == "declaration"
&& (it->kind() == "Function" || it->kind() == "CXXMethod"
|| it->kind() == "CXXConstructor" || it->kind() == "CXXDestructor"
|| it->kind() == "Lambda")) {
if (!isVar)
break;