[PATCH] D151010: [NFC][CLANG] Fix issue with dereference null return value found by Coverity static analyzer tool
Soumi Manna via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 19 20:21:11 PDT 2023
Manna updated this revision to Diff 523983.
Manna added a comment.
Fix Clang-format error
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151010/new/
https://reviews.llvm.org/D151010
Files:
clang/lib/ARCMigrate/ObjCMT.cpp
Index: clang/lib/ARCMigrate/ObjCMT.cpp
===================================================================
--- clang/lib/ARCMigrate/ObjCMT.cpp
+++ clang/lib/ARCMigrate/ObjCMT.cpp
@@ -1056,10 +1056,10 @@
T = TD->getDecl()->getUnderlyingType();
if (OrigT == T || !T->isPointerType())
return true;
- const PointerType* PT = T->getAs<PointerType>();
+ const PointerType* PT = T->castAs<PointerType>();
QualType UPointeeT = PT->getPointeeType().getUnqualifiedType();
if (UPointeeT->isRecordType()) {
- const RecordType *RecordTy = UPointeeT->getAs<RecordType>();
+ const RecordType *RecordTy = UPointeeT->castAs<RecordType>();
if (!RecordTy->getDecl()->isCompleteDefinition())
return false;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151010.523983.patch
Type: text/x-patch
Size: 730 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230520/51abfbe8/attachment.bin>
More information about the cfe-commits
mailing list