[clang] [clang][Interp] Implement __builtin_popcount() (PR #67929)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 2 07:12:05 PDT 2023
================
@@ -260,3 +260,12 @@ namespace SourceLocation {
static_assert(c.a.n == __LINE__ - 1, "");
}
}
+
+namespace popcount {
+ static_assert(__builtin_popcount(~0u) == __CHAR_BIT__ * sizeof(unsigned int), "");
----------------
erichkeane wrote:
I would suggest more 'difficult' tests here, something other than fully saturated.
https://github.com/llvm/llvm-project/pull/67929
More information about the cfe-commits
mailing list