summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGClass.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/CGClass.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/CGClass.cpp')
-rw-r--r--clang/lib/CodeGen/CGClass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp
index f228329ad9b..ab8588303d2 100644
--- a/clang/lib/CodeGen/CGClass.cpp
+++ b/clang/lib/CodeGen/CGClass.cpp
@@ -739,7 +739,7 @@ bool CodeGenFunction::IsConstructorDelegationValid(
// We also disable the optimization for variadic functions because
// it's impossible to "re-pass" varargs.
- if (Ctor->getType()->getAs<FunctionProtoType>()->isVariadic())
+ if (Ctor->getType()->castAs<FunctionProtoType>()->isVariadic())
return false;
// FIXME: Decide if we can do a delegation of a delegating constructor.
OpenPOWER on IntegriCloud