[PATCH] [libcxx] Fix __is_power2 and __next_power2. Change hashmap to handle new behavior.

Dmitri Gribenko gribozavr at gmail.com
Sun Aug 17 17:19:56 PDT 2014


Instead of duplicating the ``__bc <= 2 || !__is_power2(__bc)`` check, can it be abstracted into another predicate?

Also, I don't know what is the policy of libc++ about testing internal APIs, but __is_power2 and __next_pow2 seem to be clearly testable.

http://reviews.llvm.org/D4948






More information about the cfe-commits mailing list