ClangCodeModel: Fix providing virtual override list

... when the cursor is right before the opening parenthesis of a member
function call. The clang AST is different then.

Change-Id: Ibb75c15d2e28c2004b5ab2dd8fd3db0a2da88e56
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-05-28 14:30:49 +02:00
parent 3112d063e8
commit 9426ce99a1
2 changed files with 2 additions and 7 deletions

View File

@@ -138,7 +138,8 @@ public:
bool isMemberFunctionCall() const bool isMemberFunctionCall() const
{ {
return role() == "expression" && kind() == "Member" && arcanaContains("member function"); return role() == "expression" && (kind() == "CXXMemberCall"
|| (kind() == "Member" && arcanaContains("member function")));
} }
bool isPureVirtualDeclaration() const bool isPureVirtualDeclaration() const

View File

@@ -446,12 +446,6 @@ F2TestCase::F2TestCase(CppEditorAction action,
}); });
t.start(10000); t.start(10000);
l.exec(); l.exec();
QEXPECT_FAIL("possibleOverrides2",
"FIXME: clangd behaves differently with cursor at end of function name",
Abort);
QEXPECT_FAIL("QTCREATORBUG-10294_cursorIsAtTheEndOfVirtualFunctionName",
"FIXME: clangd behaves differently with cursor at end of function name",
Abort);
QEXPECT_FAIL("noSiblings_references", "FIXME: check why this fails", Abort); QEXPECT_FAIL("noSiblings_references", "FIXME: check why this fails", Abort);
QEXPECT_FAIL("noSiblings_pointers", "FIXME: check why this fails", Abort); QEXPECT_FAIL("noSiblings_pointers", "FIXME: check why this fails", Abort);
QEXPECT_FAIL("noSiblings_noBaseExpression", "FIXME: check why this fails", Abort); QEXPECT_FAIL("noSiblings_noBaseExpression", "FIXME: check why this fails", Abort);