Change checked arithmetic functions API to return Optional
ClosedPublic

Authored by george.karpenkov on Wed, Jun 13, 10:41 AM.

Details

Summary

Returning optional is much safer.
The previous API had potential to cause use of undefined variables, if the value passed by pointer was accidentally read afterwards.

Diff Detail

Repository
rL LLVM
NoQ accepted this revision.Wed, Jun 13, 11:14 AM
This revision is now accepted and ready to land.Wed, Jun 13, 11:14 AM
This revision was automatically updated to reflect the committed changes.