Skip to content

Commit

Permalink
[NFC][Clang] Fix static analyzer concern
Browse files Browse the repository at this point in the history
Fix static analyzer concern about null value
dereference. InterfacePointerType is dereferenced
and should not be null.

Differential Revision: https://reviews.llvm.org/D157454
  • Loading branch information
elizabethandrews committed Aug 14, 2023
1 parent f598b61 commit 421c9bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions clang/lib/CodeGen/CGObjC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ llvm::Value *CodeGenFunction::EmitObjCCollectionLiteral(const Expr *E,
QualType ResultType = E->getType();
const ObjCObjectPointerType *InterfacePointerType
= ResultType->getAsObjCInterfacePointerType();
assert(InterfacePointerType && "Unexpected InterfacePointerType - null");
ObjCInterfaceDecl *Class
= InterfacePointerType->getObjectType()->getInterface();
CGObjCRuntime &Runtime = CGM.getObjCRuntime();
Expand Down

0 comments on commit 421c9bb

Please sign in to comment.