This is an archive of the discontinued LLVM Phabricator instance.

OptionValue::Clear should return void not bool
ClosedPublic

Authored by jingham on Jul 21 2020, 11:01 AM.

Details

Summary

I forgot to add a "return true" to the new OptionValueFileColonLine::Clear method which the Windows compiler caught (thanks Jonas for fixing that!)

But that made me wonder if returning true was actually doing any good. How could clearing an OptionValue fail? And what would you do about it. The answer was "nothing" since all the implementations returned true, and none of the clients checked the return value.

This is just unsetting some ivars, so it should always succeed and clients shouldn't have to worry about that happening.

Diff Detail

Event Timeline

jingham created this revision.Jul 21 2020, 11:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2020, 11:01 AM
This revision is now accepted and ready to land.Jul 21 2020, 11:14 AM
This revision was automatically updated to reflect the committed changes.