[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 13 09:58:04 PDT 2023


================
@@ -10136,6 +10136,9 @@ def err_vec_builtin_incompatible_vector : Error<
 def err_vsx_builtin_nonconstant_argument : Error<
   "argument %0 to %1 must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)">;
 
+def err_vectorelements_non_vector : Error<
+ "'__builtin_vectorelements' argument must be a vector">;
----------------
erichkeane wrote:

Do we use similar language elsewhere?  "Must be a vector" is pretty confusing.

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


More information about the cfe-commits mailing list