[clang] [Clang][Interp] Diagnose use sizeless vector type as the argument of `__builtin_vectorelements` (PR #99794)

via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 21 08:14:01 PDT 2024


================
@@ -2735,6 +2736,13 @@ inline bool InvalidDeclRef(InterpState &S, CodePtr OpPC,
   return CheckDeclRef(S, OpPC, DR);
 }
 
+inline bool SizelessVectorElementSize(InterpState &S, CodePtr OpPC) {
----------------
yronglin wrote:

Thanks, agree 100%, it should keeps same behavior with https://github.com/llvm/llvm-project/blob/c8c0b18b5d58415b79ea13b62eee70c130c26a0a/clang/lib/AST/ExprConstant.cpp#L14080-L14092 .

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


More information about the cfe-commits mailing list