[PATCH] D151769: [NFC][CLANG] Fix nullptr dereference issue in HandleRISCVRVVVectorBitsTypeAttr()

Soumi Manna via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 30 20:39:00 PDT 2023


Manna updated this revision to Diff 526882.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151769/new/

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();
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151769.526882.patch
Type: text/x-patch
Size: 580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230531/dd2ec148/attachment.bin>


More information about the cfe-commits mailing list