summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CocoaConventions.cpp
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2019-08-28 21:19:58 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2019-08-28 21:19:58 +0000
commit3517d10575e29b57b5894aced3539e0ab92fba05 (patch)
tree0c8d1334f71e1f6e6cfac9b3f255d78cf4d56b1e /clang/lib/Analysis/CocoaConventions.cpp
parent7bb847478b6ad3235e59b7caec3cce717ce526ae (diff)
downloadbcm5719-llvm-3517d10575e29b57b5894aced3539e0ab92fba05.tar.gz
bcm5719-llvm-3517d10575e29b57b5894aced3539e0ab92fba05.zip
[analyzer] Fix more analyzer warnings on analyzer and libAnalysis.
llvm-svn: 370263
Diffstat (limited to 'clang/lib/Analysis/CocoaConventions.cpp')
-rw-r--r--clang/lib/Analysis/CocoaConventions.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Analysis/CocoaConventions.cpp b/clang/lib/Analysis/CocoaConventions.cpp
index b2ef426dead..571d72e1a84 100644
--- a/clang/lib/Analysis/CocoaConventions.cpp
+++ b/clang/lib/Analysis/CocoaConventions.cpp
@@ -38,8 +38,8 @@ bool cocoa::isRefType(QualType RetTy, StringRef Prefix,
return false;
// Is the type void*?
- const PointerType* PT = RetTy->getAs<PointerType>();
- if (!(PT->getPointeeType().getUnqualifiedType()->isVoidType()))
+ const PointerType* PT = RetTy->castAs<PointerType>();
+ if (!PT || !PT->getPointeeType().getUnqualifiedType()->isVoidType())
return false;
// Does the name start with the prefix?
OpenPOWER on IntegriCloud