Page MenuHomePhabricator

[AST] Improve overflow diagnostics for fixed-point constant evaluation.

Authored by ebevhan on Jan 22 2020, 6:25 AM.



Diagnostics for overflow were not being produced for fixed-point
evaluation. This patch refactors a bit of the evaluator and adds
a proper diagnostic for these cases.

Event Timeline

ebevhan created this revision.Jan 22 2020, 6:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 22 2020, 6:25 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
leonardchan accepted this revision.Jan 22 2020, 5:31 PM

Could you also add a few test lines showing this warning doesn't appear for operations where the result is a saturated type?

This revision is now accepted and ready to land.Jan 22 2020, 5:31 PM
ebevhan updated this revision to Diff 239799.Jan 23 2020, 12:41 AM

Added tests for saturating types. Changed the warning group name for consistency.