summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCXX.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-10-07 16:42:25 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-10-07 16:42:25 +0000
commit7e38f0c408058ec104df4f92b9d0789ab07f21e8 (patch)
tree103440c5fc2a42b40e14ef67de59a70181e66f49 /clang/lib/CodeGen/CGCXX.cpp
parentb3342e180e9c2cc59580796d3c4b88a1b7d65434 (diff)
downloadbcm5719-llvm-7e38f0c408058ec104df4f92b9d0789ab07f21e8.tar.gz
bcm5719-llvm-7e38f0c408058ec104df4f92b9d0789ab07f21e8.zip
Codegen - silence static analyzer getAs<> null dereference warnings. NFCI.
The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. llvm-svn: 373918
Diffstat (limited to 'clang/lib/CodeGen/CGCXX.cpp')
-rw-r--r--clang/lib/CodeGen/CGCXX.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp
index a39bf0f6de2..7e5fe0fd6b1 100644
--- a/clang/lib/CodeGen/CGCXX.cpp
+++ b/clang/lib/CodeGen/CGCXX.cpp
@@ -104,8 +104,8 @@ bool CodeGenModule::TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D) {
// Give up if the calling conventions don't match. We could update the call,
// but it is probably not worth it.
const CXXDestructorDecl *BaseD = UniqueBase->getDestructor();
- if (BaseD->getType()->getAs<FunctionType>()->getCallConv() !=
- D->getType()->getAs<FunctionType>()->getCallConv())
+ if (BaseD->getType()->castAs<FunctionType>()->getCallConv() !=
+ D->getType()->castAs<FunctionType>()->getCallConv())
return true;
GlobalDecl AliasDecl(D, Dtor_Base);
OpenPOWER on IntegriCloud