[AST] Fix handling of some edge cases in fixed-point division.
authorBevin Hansson <bevin.hansson@ericsson.com>
Tue, 30 Jun 2020 11:35:29 +0000 (13:35 +0200)
committerBevin Hansson <bevin.hansson@ericsson.com>
Tue, 30 Jun 2020 11:47:12 +0000 (13:47 +0200)
commit33bae9c265486cd37e0612711a863f0a4b865a26
treebb8912583b8390588cef9cd29b1de776db9b6534
parent80eb42281feb7834054be5f933f63d8c64af229d
[AST] Fix handling of some edge cases in fixed-point division.

Division by zero was not being handled, and division of
-EPSILON / MAX did not perform rounding correctly.
clang/lib/AST/ExprConstant.cpp
clang/lib/Basic/FixedPoint.cpp
clang/test/Frontend/fixed_point_div.c
clang/test/Frontend/fixed_point_errors.c