[PATCH] D152107: [NFC][CLANG] Fix nullptr dereference issue in checkSizelessVectorShift()
Soumi Manna via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 5 08:13:18 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3581e6b857f4: [NFC][CLANG] Fix nullptr dereference issue in checkSizelessVectorShift() (authored by Manna).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152107/new/
https://reviews.llvm.org/D152107
Files:
clang/lib/Sema/SemaExpr.cpp
Index: clang/lib/Sema/SemaExpr.cpp
===================================================================
--- clang/lib/Sema/SemaExpr.cpp
+++ clang/lib/Sema/SemaExpr.cpp
@@ -12098,14 +12098,14 @@
return QualType();
QualType LHSType = LHS.get()->getType();
- const BuiltinType *LHSBuiltinTy = LHSType->getAs<BuiltinType>();
+ const BuiltinType *LHSBuiltinTy = LHSType->castAs<BuiltinType>();
QualType LHSEleType = LHSType->isVLSTBuiltinType()
? LHSBuiltinTy->getSveEltType(S.getASTContext())
: LHSType;
// Note that RHS might not be a vector
QualType RHSType = RHS.get()->getType();
- const BuiltinType *RHSBuiltinTy = RHSType->getAs<BuiltinType>();
+ const BuiltinType *RHSBuiltinTy = RHSType->castAs<BuiltinType>();
QualType RHSEleType = RHSType->isVLSTBuiltinType()
? RHSBuiltinTy->getSveEltType(S.getASTContext())
: RHSType;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152107.528451.patch
Type: text/x-patch
Size: 969 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230605/0400edd1/attachment.bin>
More information about the cfe-commits
mailing list