forked from qt-creator/qt-creator
ClangCodeModel: Fix usage type of constructors in "Find References"
In particular, in a variable definition, the (invisible) reference to the constructor is *not* a declaration (but an implicit call). Change-Id: Ic1f29a4da360959e81ec536efbf1175924ea34d7 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -261,6 +261,13 @@ void ClangdTestFindReferences::test_data()
|
||||
makeItem(58, 10, Usage::Tag::Read), makeItem(58, 22, Usage::Tag::Read),
|
||||
makeItem(59, 4, Usage::Tag::Write), makeItem(59, 21, Usage::Tag::Read)};
|
||||
|
||||
QTest::newRow("struct type 2") << "defs.h" << 450 << ItemList{
|
||||
makeItem(20, 7, Usage::Tag::Declaration), makeItem(5, 4, Usage::Tags()),
|
||||
makeItem(13, 21, Usage::Tags()), makeItem(32, 8, Usage::Tags())};
|
||||
|
||||
QTest::newRow("constructor") << "defs.h" << 627 << ItemList{
|
||||
makeItem(31, 4, Usage::Tag::Declaration), makeItem(36, 7, Usage::Tags())};
|
||||
|
||||
QTest::newRow("subclass") << "defs.h" << 450 << ItemList{
|
||||
makeItem(20, 7, Usage::Tag::Declaration), makeItem(5, 4, Usage::Tags()),
|
||||
makeItem(13, 21, Usage::Tags()), makeItem(32, 8, Usage::Tags())};
|
||||
|
||||
Reference in New Issue
Block a user