This is an archive of the discontinued LLVM Phabricator instance.

[modules] addHeaderInclude() can't fail.
ClosedPublic

Authored by davide on Mar 1 2016, 7:37 PM.

Details

Summary

I noticed that addHeaderInclude() returns bool although it can never fail.
I find this a little bit weird from a semantic point of view. My best guess is that the 'bool' return type was put there 'just in case'.
I'd like to change its return type to void until real evidence that this function can fail is provided, unless, of course, I'm missing something.

Diff Detail

Repository
rL LLVM

Event Timeline

davide updated this revision to Diff 49578.Mar 1 2016, 7:37 PM
davide retitled this revision from to [modules] addHeaderInclude() can't fail..
davide updated this object.
davide added reviewers: silvas, rsmith, christof.
davide added a subscriber: cfe-commits.

As an added bonus, this simplifies the code a little bit.

davide edited reviewers, added: doug.gregor; removed: christof.Mar 1 2016, 7:38 PM
silvas accepted this revision.Mar 1 2016, 8:06 PM
silvas edited edge metadata.

Nice cleanup. LGTM.

This revision is now accepted and ready to land.Mar 1 2016, 8:06 PM
This revision was automatically updated to reflect the committed changes.