[llvm] r285256 - [APFloat] Fix APFloat::getExactInverse when the input is nullptr. This is a regression introduced by r285105.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 31 11:00:30 PDT 2016


Test case? Or was this already tested?

On Wed, Oct 26, 2016 at 4:41 PM Tim Shen via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: timshen
> Date: Wed Oct 26 18:31:41 2016
> New Revision: 285256
>
> URL: http://llvm.org/viewvc/llvm-project?rev=285256&view=rev
> Log:
> [APFloat] Fix APFloat::getExactInverse when the input is nullptr. This is
> a regression introduced by r285105.
>
> Reviewers: kbarton, echristo, iteratee, eugenis
>
> Subscribers: llvm-commits, mehdi_amini
>
> Differential Revision: https://reviews.llvm.org/D26017
>
> Modified:
>     llvm/trunk/include/llvm/ADT/APFloat.h
>
> Modified: llvm/trunk/include/llvm/ADT/APFloat.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APFloat.h?rev=285256&r1=285255&r2=285256&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/ADT/APFloat.h (original)
> +++ llvm/trunk/include/llvm/ADT/APFloat.h Wed Oct 26 18:31:41 2016
> @@ -855,7 +855,7 @@ public:
>    }
>
>    bool getExactInverse(APFloat *inv) const {
> -    return IEEE.getExactInverse(&inv->IEEE);
> +    return IEEE.getExactInverse(inv ? &inv->IEEE : nullptr);
>    }
>
>    friend hash_code hash_value(const APFloat &Arg);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161031/acdd3448/attachment.html>


More information about the llvm-commits mailing list