-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[libc][math] Fix buildbot fails #151186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libc][math] Fix buildbot fails #151186
Conversation
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
@llvm/pr-subscribers-libc Author: Krishna Pandey (krishna2803) Changescc @lntue Full diff: https://github.com/llvm/llvm-project/pull/151186.diff 1 Files Affected:
diff --git a/libc/src/__support/FPUtil/cast.h b/libc/src/__support/FPUtil/cast.h
index e6fad1be7d053..719b1eaa97ff4 100644
--- a/libc/src/__support/FPUtil/cast.h
+++ b/libc/src/__support/FPUtil/cast.h
@@ -66,9 +66,8 @@ cast(InType x) {
cpp::max(OutFPBits::FRACTION_LEN, InFPBits::FRACTION_LEN);
DyadicFloat<cpp::bit_ceil(MAX_FRACTION_LEN)> xd(x);
return xd.template as<OutType, /*ShouldSignalExceptions=*/true>();
- }
-
- return static_cast<OutType>(x);
+ } else
+ return static_cast<OutType>(x);
}
} // namespace LIBC_NAMESPACE::fputil
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, feel free to fix the nit in a separate PR to unbreak the buildbots sooner.
libc/src/__support/FPUtil/cast.h
Outdated
} else | ||
return static_cast<OutType>(x); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: since the if
has braces the else
should too.
Co-authored-by: OverMighty <its.overmighty@gmail.com>
No description provided.