[clang] [DO NOT MERGE][clang][RISCV] Introduce OFP8(E4M3, E5M2) RISC-V vector types (PR #191349)

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 10 10:13:42 PDT 2026


================
@@ -1513,11 +1528,23 @@ bool SemaRISCV::CheckBuiltinFunctionCall(const TargetInfo &TI,
 
 void SemaRISCV::checkRVVTypeSupport(QualType Ty, SourceLocation Loc, Decl *D,
                                     const llvm::StringMap<bool> &FeatureMap) {
+  const BuiltinType *BT = Ty->castAs<BuiltinType>();
   ASTContext::BuiltinVectorTypeInfo Info =
-      SemaRef.Context.getBuiltinVectorTypeInfo(Ty->castAs<BuiltinType>());
+      SemaRef.Context.getBuiltinVectorTypeInfo(BT);
   unsigned EltSize = SemaRef.Context.getTypeSize(Info.ElementType);
   unsigned MinElts = Info.EC.getKnownMinValue();
 
+  auto IsOFP8Type = [&]() {
----------------
topperc wrote:

Drop the capture and pass BT to the lambda.

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


More information about the cfe-commits mailing list