This is an archive of the discontinued LLVM Phabricator instance.

Assigning and copying command line option objects shouldn't be allowed.
ClosedPublic

Authored by beanz on Jan 21 2015, 5:46 PM.

Details

Summary

The default copy and assignment operators for these objects probably don't actually do what the clients intend, so they should be deleted.

Places using the assignment operator to set the value of an option should cast to the option's data type first to call into the override for operator=. Places using the copy constructor just need to be changed to not copy (i.e. passing by const reference instead of value).

Diff Detail

Repository
rL LLVM

Event Timeline

beanz updated this revision to Diff 18575.Jan 21 2015, 5:46 PM
beanz retitled this revision from to Assigning and copying command line option objects shouldn't be allowed..
beanz updated this object.
beanz edited the test plan for this revision. (Show Details)
beanz added reviewers: dexonsmith, chandlerc.
beanz added a subscriber: Unknown Object (MLST).
chandlerc accepted this revision.Jan 21 2015, 5:49 PM
chandlerc edited edge metadata.

Seems obviously good. Please commit.

This revision is now accepted and ready to land.Jan 21 2015, 5:49 PM
This revision was automatically updated to reflect the committed changes.