Manna created this revision. Manna added a reviewer: erichkeane. Herald added subscribers: VincentWu, vkmr, luismarques, sameer.abuasal, s.egerton, Jim, benna, psnobl, PkmX, rogfer01, shiva0217, kito-cheng, simoncook, arichardson. Herald added a project: All. Manna requested review of this revision. Herald added subscribers: pcwang-thead, eopXD. Herald added a project: clang.
This patch uses castAs instead of getAs which will assert if the type doesn't match in In HandleRISCVRVVVectorBitsTypeAttr(clang::QualType &, clang::ParsedAttr &, clang::Sema &) Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D151769 Files: clang/lib/Sema/SemaType.cpp Index: clang/lib/Sema/SemaType.cpp =================================================================== --- clang/lib/Sema/SemaType.cpp +++ clang/lib/Sema/SemaType.cpp @@ -8331,7 +8331,7 @@ unsigned VecSize = static_cast<unsigned>(RVVVectorSizeInBits.getZExtValue()); ASTContext::BuiltinVectorTypeInfo Info = - S.Context.getBuiltinVectorTypeInfo(CurType->getAs<BuiltinType>()); + S.Context.getBuiltinVectorTypeInfo(CurType->castAs<BuiltinType>()); unsigned EltSize = S.Context.getTypeSize(Info.ElementType); unsigned MinElts = Info.EC.getKnownMinValue();
Index: clang/lib/Sema/SemaType.cpp =================================================================== --- clang/lib/Sema/SemaType.cpp +++ clang/lib/Sema/SemaType.cpp @@ -8331,7 +8331,7 @@ unsigned VecSize = static_cast<unsigned>(RVVVectorSizeInBits.getZExtValue()); ASTContext::BuiltinVectorTypeInfo Info = - S.Context.getBuiltinVectorTypeInfo(CurType->getAs<BuiltinType>()); + S.Context.getBuiltinVectorTypeInfo(CurType->castAs<BuiltinType>()); unsigned EltSize = S.Context.getTypeSize(Info.ElementType); unsigned MinElts = Info.EC.getKnownMinValue();
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits