Improve the signature we present of an overriden method
ClosedPublic

Authored by apol on Sep 28 2015, 1:26 AM.

Details

Summary

Adds the override keyword (and a ; to end the line properly).
Drops the virtual method, because it's redundant to override.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
apol updated this revision to Diff 931.Sep 28 2015, 1:26 AM
apol retitled this revision from to Improve the signature we present of an overriden method.
apol updated this object.
apol edited the test plan for this revision. (Show Details)
apol added a reviewer: KDevelop.
mwolff added a subscriber: mwolff.Sep 28 2015, 9:03 AM

+1, go for it!

+1 looks good!
I always use C++11 so I don't have to add override manually anymore.

codecompletion/context.cpp
162

As you are using a regex anyway possibly "\\s*=\\s*0" instead? While unlikely e.g. a tab character could also appear there (and comments but that seems overkill).

apol planned changes to this revision.Oct 4 2015, 10:30 PM
apol marked an inline comment as done.

So I have this changed locally, can I get a +2?

/me getting used to Phabricator.

apol requested a review of this revision.Oct 4 2015, 10:31 PM
mwolff accepted this revision.Oct 8 2015, 9:20 AM
mwolff added a reviewer: mwolff.

go for it!

This revision is now accepted and ready to land.Oct 8 2015, 9:20 AM
kfunk added a subscriber: kfunk.Oct 21 2015, 1:17 PM

Hm, what if you *don't* use C++11 in your code? It's still a fairly valid use-case.

Then adding a bogus 'override' every time is annoying.

This should be an optional feature, enabled based on whether this project allows C++11. Could be an option in the C++ project config page, or some other condition...

@kfunk: the configuration already allows the user to change the standard, so we should be able to leverage that here and use the old syntax for c++98 projects.