diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-10-07 16:42:25 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-10-07 16:42:25 +0000 |
commit | 7e38f0c408058ec104df4f92b9d0789ab07f21e8 (patch) | |
tree | 103440c5fc2a42b40e14ef67de59a70181e66f49 /clang/lib/CodeGen/CGClass.cpp | |
parent | b3342e180e9c2cc59580796d3c4b88a1b7d65434 (diff) | |
download | bcm5719-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.cpp | 2 |
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. |