Summary: | Usage of "Adapt signature" to rename argument in constructor inserts keyword "void" in its declaration | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Piotr Mierzwinski <piotr.mierzwinski> |
Component: | Language Support: CPP (Clang-based) | Assignee: | kdevelop-bugs-null |
Status: | REOPENED --- | ||
Severity: | normal | CC: | nalvarez, piotr.mierzwinski |
Priority: | NOR | ||
Version First Reported In: | 5.3.1 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/kdevelop/3f99e3deefbe3b77ba023bf09b69d8da3ca815fc | Version Fixed In: | 5.2.2 |
Sentry Crash Report: |
Description
Piotr Mierzwinski
2016-07-11 21:03:37 UTC
*** Bug 375276 has been marked as a duplicate of this bug. *** I tested this in KDevelop 5.0.4 and bug still persists. Git commit e334d754bf510bdf21368858d8494adf3622fb16 by Milian Wolff, on behalf of Shashwat Dixit. Committed on 15/03/2018 at 10:40. Pushed by mwolff into branch 'master'. Do not add return type to constructors declaration when editing definition in signature assistant. Reviewers: kfunk, mwolff, #kdevelop, brauch Reviewed By: mwolff, #kdevelop, brauch Subscribers: brauch, apol, #kdevelop, kdevelop-devel Tags: #kdevelop Differential Revision: https://phabricator.kde.org/D11291 M +1 -1 plugins/clang/codegen/adaptsignatureassistant.cpp M +8 -0 plugins/clang/tests/test_assistants.cpp https://commits.kde.org/kdevelop/e334d754bf510bdf21368858d8494adf3622fb16 Git commit 3f99e3deefbe3b77ba023bf09b69d8da3ca815fc by Kevin Funk, on behalf of Shashwat Dixit. Committed on 15/03/2018 at 18:39. Pushed by kfunk into branch '5.2'. Do not add return type to constructors declaration when editing definition in signature assistant. Reviewers: kfunk, mwolff, #kdevelop, brauch Reviewed By: mwolff, #kdevelop, brauch Subscribers: brauch, apol, #kdevelop, kdevelop-devel Tags: #kdevelop Differential Revision: https://phabricator.kde.org/D11291 (cherry picked from commit e334d754bf510bdf21368858d8494adf3622fb16) M +1 -1 plugins/clang/codegen/adaptsignatureassistant.cpp M +8 -0 plugins/clang/tests/test_assistants.cpp https://commits.kde.org/kdevelop/3f99e3deefbe3b77ba023bf09b69d8da3ca815fc *** Bug 375277 has been marked as a duplicate of this bug. *** Either I found new case when constructor is broken by inserting void on its begin or this is just regression. Initial code looks like below: Header file (myclass.h): public: MyClass(); cpp file (myclass.cpp): MyClass::MyClass() { // some code } Steps to reproduce: 1. instead of "// some code" in definition of constructor put code like below: if (bParam) ; 2. copy to clipboard string like: "bool bParam" 3. paste copied string as parameter for constructor in cpp file. After that definition will look like this: MyClass::MyClass( bool bParam ) 4. Click on end above line, KDevelop will show two solutions, suggesting how to fix the code 5. Click into the first one and after click into the second one 6. Switch to header file CURRENT RESULT: public: void MyClass( bool bParam ); EXPECTED RESULT: public: MyClass( bool bParam ); |