Summary: | Code completion for templated classes is incorrect | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Ian H <master.haber> |
Component: | Code completion | Assignee: | kdevelop-bugs-null |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | amhndu, gael.lebaccon, kde, sumeettulsani1 |
Priority: | NOR | ||
Version: | 5.2.80 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Ian H
2016-10-19 13:04:08 UTC
In fact the code completion is " partially broken" for all template type not just for Qt. Steps to reproduce: template<class T> class Foo { public: void bar(int i); }; Foo<int> foo; foo. {ctrl + space} It's because in ClangCodeCompletionContext::completionItems the clang_getCompletionParent function return "Foo" for "bar" function so the QualifiedIdentifier is "Foo::bar" when the KDevelop::Declaration QualifiedIdentifier is "Foo< T >::bar". As the declaration identifier does not match, KDevelop does not find informations extracted during parse process and create simple completion item with minimal information. *** Bug 363057 has been marked as a duplicate of this bug. *** Accidentally marked the wrong bug, please ignore the previous comment. |