Don't add 'override' specifier for non-modern project settings

Authored by amhndu on Nov 9 2018, 7:28 AM.



Override code completion will only add the override specifier if the parser
settings don't have either -std=c++03 or 98.

Supersedes: D4039

BUG: 372280

Test Plan

Run test_codecompletion testOverrideExecute

Diff Detail

R32 KDevelop
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
amhndu created this revision.Nov 9 2018, 7:28 AM
Restricted Application added a project: KDevelop. · View Herald TranscriptNov 9 2018, 7:28 AM
Restricted Application added a subscriber: kdevelop-devel. · View Herald Transcript
amhndu requested review of this revision.Nov 9 2018, 7:28 AM
amhndu updated this revision to Diff 45160.Nov 9 2018, 10:26 AM
  • Change test case and convert octal literal to decimal
kfunk accepted this revision.Dec 3 2018, 8:48 AM
kfunk added a subscriber: kfunk.

LGTM in general. If you prefer your version (instead of the one proposed by me) feel free to push directly.


The correct way to capture this would probably be -std=c\+\+(\w+), to also capture potential things like "-std=c++1x" (though you don't check that here). Still feels cleaner.


And consecutively here: (standard != "98" && standard != "03")

Was a little confused by the 3 here at first. I think the string version makes it clearer.



This revision is now accepted and ready to land.Dec 3 2018, 8:48 AM
amhndu marked 3 inline comments as done.Dec 3 2018, 9:54 AM

Will push with your version, looks better.
Thanks for the review :)

This revision was automatically updated to reflect the committed changes.