[clang] [clang][test] Fix constant __builtin_popcountg test requiring __int128 (PR #84412)

via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 7 16:58:05 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: OverMighty (overmighty)

<details>
<summary>Changes</summary>

See https://lab.llvm.org/buildbot/#/builders/245/builds/21611/steps/5/logs/FAIL__Clang__constant-builtins-2_c.


---
Full diff: https://github.com/llvm/llvm-project/pull/84412.diff


1 Files Affected:

- (modified) clang/test/Sema/constant-builtins-2.c (+2) 


``````````diff
diff --git a/clang/test/Sema/constant-builtins-2.c b/clang/test/Sema/constant-builtins-2.c
index 0935abe4c65fbe..6dd1d88759c751 100644
--- a/clang/test/Sema/constant-builtins-2.c
+++ b/clang/test/Sema/constant-builtins-2.c
@@ -242,7 +242,9 @@ char popcount12[__builtin_popcountg(0xF0F0U) == 8 ? 1 : -1];
 char popcount13[__builtin_popcountg(~0U) == BITSIZE(int) ? 1 : -1];
 char popcount14[__builtin_popcountg(~0UL) == BITSIZE(long) ? 1 : -1];
 char popcount15[__builtin_popcountg(~0ULL) == BITSIZE(long long) ? 1 : -1];
+#ifdef __SIZEOF_INT128__
 char popcount16[__builtin_popcountg(~(unsigned __int128)0) == BITSIZE(__int128) ? 1 : -1];
+#endif
 char popcount17[__builtin_popcountg(~(unsigned _BitInt(128))0) == BITSIZE(_BitInt(128)) ? 1 : -1];
 
 char parity1[__builtin_parity(0) == 0 ? 1 : -1];

``````````

</details>


https://github.com/llvm/llvm-project/pull/84412


More information about the cfe-commits mailing list