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

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

Details

Summary

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

Repository
R32 KDevelop
Branch
config-override
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 4749
Build 4767: arc lint + arc unit
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.

plugins/clang/codecompletion/context.cpp
186

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.

191

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.

plugins/clang/tests/test_codecompletion.cpp
1479

Unrelated.

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.