[libc-commits] [PATCH] D129619: [libc] Reset rounding mode after fsetround tests
Alex Brachet via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Jul 13 08:43:30 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4f281fa2a86b: [libc] Reset rounding mode after fsetround tests (authored by abrachet).
Herald added a project: libc-project.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129619/new/
https://reviews.llvm.org/D129619
Files:
libc/test/src/fenv/rounding_mode_test.cpp
Index: libc/test/src/fenv/rounding_mode_test.cpp
===================================================================
--- libc/test/src/fenv/rounding_mode_test.cpp
+++ libc/test/src/fenv/rounding_mode_test.cpp
@@ -14,6 +14,13 @@
#include <fenv.h>
TEST(LlvmLibcRoundingModeTest, SetAndGet) {
+ struct ResetDefaultRoundingMode {
+ int original;
+ ~ResetDefaultRoundingMode() {
+ __llvm_libc::fesetround(original);
+ }
+ } reset{__llvm_libc::fegetround()};
+
int s = __llvm_libc::fesetround(FE_TONEAREST);
EXPECT_EQ(s, 0);
int rm = __llvm_libc::fegetround();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129619.444285.patch
Type: text/x-patch
Size: 584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220713/35fddff2/attachment.bin>
More information about the libc-commits
mailing list