llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[APFloat] Unit tests use integer overload with floating-point literals.

Open llvmbot opened this issue 9 years ago • 2 comments

Bugzilla Link 34095
Resolution FIXED
Resolved on Dec 04, 2019 02:29
Version trunk
OS All
Reporter LLVM Bugzilla Contributor
CC @chandlerc,@ekatz
Fixed by commit(s) rG2b6b8cb10c87

Extended Description

Constructor invocations such as APFloat(APFloat::IEEEdouble(), 0.0) have a float literal (only 0.0, 1.0 and 3.0 in all the unit tests) in the source but the overload they reach is actually the integerPart one, not a float or double overload (which only exists when fltSemantics aren't passed).

The values they're used with happen to be all integers and they do work, but the unit tests are a bit misleading.

llvmbot avatar Aug 07 '17 07:08 llvmbot

Fix available in https://reviews.llvm.org/D70425

ekatz avatar Nov 19 '19 10:11 ekatz

assigned to @ekatz

llvmbot avatar Aug 07 '17 07:08 llvmbot