Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit b493cc03 authored by Sergey Kalinichev's avatar Sergey Kalinichev

Fix false positive member access replacement

A wrong position was used here.
parent 805c3f7a
......@@ -747,7 +747,7 @@ ClangCodeCompletionContext::ClangCodeCompletionContext(const DUContextPointer& c
unsaved.Length = content.size() + 1;
m_results.reset(clang_codeCompleteAt(session.unit(), file.constData(),
position.line() + 1, position.column() + 1,
position.line() + 1, position.column() + 1 + 1,
&unsaved, 1,
clang_defaultCodeCompleteOptions()));
......
......@@ -483,6 +483,11 @@ void TestCodeCompletion::testReplaceMemberAccess_data()
<< CompletionItems{{1, 3}, {
"function"
}};
QTest::newRow("no replacement needed")
<< "int main() { double a = \n0. "
<< CompletionItems{{1, 2}, {
}};
}
void TestCodeCompletion::testVirtualOverride()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment