Skip to content

Commit 421c9bb

Browse files
[NFC][Clang] Fix static analyzer concern
Fix static analyzer concern about null value dereference. InterfacePointerType is dereferenced and should not be null. Differential Revision: https://reviews.llvm.org/D157454
1 parent f598b61 commit 421c9bb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clang/lib/CodeGen/CGObjC.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ llvm::Value *CodeGenFunction::EmitObjCCollectionLiteral(const Expr *E,
222222
QualType ResultType = E->getType();
223223
const ObjCObjectPointerType *InterfacePointerType
224224
= ResultType->getAsObjCInterfacePointerType();
225+
assert(InterfacePointerType && "Unexpected InterfacePointerType - null");
225226
ObjCInterfaceDecl *Class
226227
= InterfacePointerType->getObjectType()->getInterface();
227228
CGObjCRuntime &Runtime = CGM.getObjCRuntime();

0 commit comments

Comments
 (0)