[clang] [llvm] [LLVM] Add validation to check the number of intrinsic args (PR #196563)

Andy Kaylor via llvm-commits llvm-commits at lists.llvm.org
Fri May 8 14:07:51 PDT 2026


================
@@ -589,17 +602,18 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
     assert(VTy && "Expected overload type to be a Vector Type");
     return VectorType::getInteger(VTy);
   }
+  case IITDescriptor::VarArg:
+    // VarArg token should be consumed by `getIntrinsicInfoTableEntries`, so we
+    // should never see it here.
----------------
andykaylor wrote:

Maybe call llvm_unreachable here so it gets a different message than "unhandled"?

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


More information about the llvm-commits mailing list