forked from OSchip/llvm-project
[Analyzer] Fix introduced regression: properly check for nullable attribute.
llvm-svn: 315492
This commit is contained in:
parent
5acfd1dd78
commit
734cad8790
|
@ -122,7 +122,8 @@ bool NonnullStringConstantsChecker::isStringlike(QualType Ty) const {
|
|||
return true;
|
||||
|
||||
if (auto *T = dyn_cast<ObjCObjectPointerType>(Ty)) {
|
||||
return T->getInterfaceDecl()->getIdentifier() == NSStringII;
|
||||
return T->getInterfaceDecl() &&
|
||||
T->getInterfaceDecl()->getIdentifier() == NSStringII;
|
||||
} else if (auto *T = dyn_cast<TypedefType>(Ty)) {
|
||||
return T->getDecl()->getIdentifier() == CFStringRefII;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue