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

Soumi Manna via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 31 10:03:55 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG071d4ab377d3: [NFC][CLANG] Fix nullptr dereference issue in HandleRISCVRVVVectorBitsTypeAttr() (authored by Manna).

Repository:
  rG LLVM Github Monorepo

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
@@ -8340,7 +8340,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.527101.patch
Type: text/x-patch
Size: 580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230531/bf8da0fc/attachment-0001.bin>


More information about the cfe-commits mailing list