Bug 375277 - Some changes trigger unnecessary "update declaration" hint on constructor
Summary: Some changes trigger unnecessary "update declaration" hint on constructor
Status: RESOLVED DUPLICATE of bug 365420
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (show other bugs)
Version: 5.1.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-19 04:41 UTC by Nicolás Alvarez
Modified: 2018-03-19 17:20 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolás Alvarez 2017-01-19 04:41:34 UTC
Start with the following code:
class Foo {
    Foo();
};
Foo::Foo() 
{
    ;
}

Wait for parsing to finish and everything to get highlighted. Now add a space(!) after the constructor's definition prototype:

Foo::Foo() <-- add a space here
{
    ;
}

The modified line is now underlined in red, and the tooltip shows "Problem in Semantic analysis: Adapt Signature" and offers to "Update declaration signature", even though there was no actual change to the signature. (Selecting this solution then triggers bug 375276 and makes the code invalid).
Comment 1 Ian H 2017-01-19 14:20:41 UTC
This also happens if you add another line of instantiation outside of the brackets.

header: int bar;

cpp file:

class Foo: 
bar(0)
{
}

adding the bar(0) will also do the update declaration signature thing.
Comment 2 Nicolás Alvarez 2017-01-19 20:22:58 UTC
Yes, that's where I noticed it initially; then I noticed a simple space was enough to trigger it.
Comment 3 KiloAlphaIndia 2017-03-24 09:37:22 UTC
I can confirm this.
Comment 4 shashwat 2018-03-16 09:22:18 UTC
Can't Reproduce 
I think fixed in commit https://phabricator.kde.org/R32:e334d754bf510bdf21368858d8494adf3622fb16
Comment 5 Kevin Funk 2018-03-19 17:20:04 UTC
Sounds sane to me. Marking as duplicate.

*** This bug has been marked as a duplicate of bug 365420 ***