[clang] [Clang] prevented assertion failure by handling integral to boolean conversions for boolean vectors (PR #108657)

Oleksandr T. via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 19 13:14:20 PDT 2024


================
@@ -51,6 +53,9 @@ static void test(void) {
     ivec4 -= ivec4;
     ivec4 |= ivec4;
     ivec4 += ptr; // expected-error {{cannot convert between vector and non-scalar values ('int4' (vector of 4 'int' values) and 'int *')}}
+
+    bvec4 != 0; // expected-warning {{inequality comparison result unused}} \
----------------
a-tarasyuk wrote:

@AaronBallman Thanks for the review, and I'm sorry for the confusion. There was a typo — the type should be `_Bool`. I've changed it to the appropriate type now.

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


More information about the cfe-commits mailing list