diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2021-05-28 14:30:49 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2021-06-14 13:30:27 +0000 |
commit | 9426ce99a1f33447e07ce6d2e1860bee753fb018 (patch) | |
tree | 6ad5db8d6bf4647c8bae52012122e09dec4c4794 | |
parent | 3112d063e84dd48ac56aad912e4b54d52e1c809a (diff) |
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>
-rw-r--r-- | src/plugins/clangcodemodel/clangdclient.cpp | 3 | ||||
-rw-r--r-- | src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp | 6 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/plugins/clangcodemodel/clangdclient.cpp b/src/plugins/clangcodemodel/clangdclient.cpp index 2eea1c1f46d..8db7c7a341d 100644 --- a/src/plugins/clangcodemodel/clangdclient.cpp +++ b/src/plugins/clangcodemodel/clangdclient.cpp @@ -138,7 +138,8 @@ public: bool isMemberFunctionCall() const { - return role() == "expression" && kind() == "Member" && arcanaContains("member function"); + return role() == "expression" && (kind() == "CXXMemberCall" + || (kind() == "Member" && arcanaContains("member function"))); } bool isPureVirtualDeclaration() const diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp index fbd23e1bd0b..7b7803d98f8 100644 --- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp +++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp @@ -446,12 +446,6 @@ F2TestCase::F2TestCase(CppEditorAction action, }); t.start(10000); 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_pointers", "FIXME: check why this fails", Abort); QEXPECT_FAIL("noSiblings_noBaseExpression", "FIXME: check why this fails", Abort); |