[libcxx-commits] [PATCH] D102328: [libc++] Fix __bitop_unsigned_integer, rename to __is_unsigned_integer, and fix constexprness of std::countr_zero(__uint128_t)
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 12 20:48:07 PDT 2021
Quuxplusone updated this revision to Diff 345027.
Quuxplusone added a comment.
Well, I don't know what's throwing `bad_cast` from inside the regex code, so let's just poke buildkite with something totally innocuous for now and see what happens.
https://buildkite.com/llvm-project/libcxx-ci/builds/3225
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102328/new/
https://reviews.llvm.org/D102328
Files:
libcxx/include/bit
Index: libcxx/include/bit
===================================================================
--- libcxx/include/bit
+++ libcxx/include/bit
@@ -116,14 +116,13 @@
else
{
int __ret = 0;
- int __iter = 0;
const unsigned int __ulldigits = numeric_limits<unsigned long long>::digits;
- while ((__iter = __libcpp_ctz(static_cast<unsigned long long>(__t))) == __ulldigits)
+ while (static_cast<unsigned long long>(__t) == 0uLL)
{
- __ret += __iter;
+ __ret += __ulldigits;
__t >>= __ulldigits;
}
- return __ret + __iter;
+ return __ret + __libcpp_ctz(static_cast<unsigned long long>(__t));
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102328.345027.patch
Type: text/x-patch
Size: 711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210513/1a0ec4d8/attachment.bin>
More information about the libcxx-commits
mailing list