| Summary: | "Implement ..." template for template methods misses the keyword "typename" | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Anton Kreuzkamp <akreuzkamp> |
| Component: | Language Support: CPP (Clang-based) | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 5.1.0 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/kdevelop/782645190f44ca1dd147e45d18fc354ef6282186 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
Git commit 782645190f44ca1dd147e45d18fc354ef6282186 by Milian Wolff, on behalf of Shashwat Dixit. Committed on 15/03/2018 at 10:43. Pushed by mwolff into branch 'master'. Fix Template (Class/Function) Signatures in Clang Code Completion Summary: - Create correct template prefix for Class/Function Templates - Handle Template Template Parameter - Do not drop function parameters for FunctionTemplates Related: bug 368544 Reviewers: #kdevelop, aspotashev, mwolff Subscribers: #kdevelop, kdevelop-devel Tags: #kdevelop Differential Revision: https://phabricator.kde.org/D10277 M +30 -5 plugins/clang/codecompletion/completionhelper.cpp M +28 -0 plugins/clang/tests/test_codecompletion.cpp M +26 -2 plugins/clang/util/clangutils.cpp https://commits.kde.org/kdevelop/782645190f44ca1dd147e45d18fc354ef6282186 |
Steps to reproduce: 1. Create a c++ project and use the clang-plugin. 2. Write a template class ``` template<typename T> class Foo { void bar(); }; ``` 3. Below (or in the cpp) press CTRL+Space at an appropriate place in order to get an completion proposal "Implement void Foo<T>::bar()" 4. Press Enter. The code will look like ``` template<T> void Foo<T>::bar() { } ``` while it needs to look like ``` template<typename T> void Foo<T>::bar() { } ```