[clang] [Clang][Sema] Report diagnostic for invalid mask in shufflevector (PR #221558)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 7 01:24:30 PDT 2026
================
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -Wno-null-conversion -fsyntax-only -verify
+
+typedef bool v8b __attribute__((ext_vector_type(8)));
+typedef float v8f __attribute__((ext_vector_type(8)));
+
+void vector_of_bool_mask() {
+ v8b a;
+ v8b b;
+ auto r = __builtin_shufflevector(a, b); // expected-error {{second argument to __builtin_shufflevector must be a vector of any integer type other than boolean (was 'v8b' (vector of 8 'bool' values))}}
----------------
Fznamznon wrote:
Can we add these cases to some existing test instead of adding a new file?
https://github.com/llvm/llvm-project/pull/221558
More information about the cfe-commits
mailing list