summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2020-01-10 17:40:34 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2020-01-10 17:41:26 +0000
commitfd8ded99fe6e9fcae2c98ccad25d6562c5fa8a14 (patch)
tree83be5542ca6498f4ee9373756f014179bc9bc91f /clang/lib/CodeGen
parentdfed052fb3ecef53bf01612ec3fc7df73c2134b7 (diff)
downloadbcm5719-llvm-fd8ded99fe6e9fcae2c98ccad25d6562c5fa8a14.tar.gz
bcm5719-llvm-fd8ded99fe6e9fcae2c98ccad25d6562c5fa8a14.zip
Fix "pointer is null" static analyzer warning. NFCI.
Use castAs<> instead of getAs<> since the pointer is dereferenced immediately below and castAs will perform the null assertion for us.
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGVTables.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp
index c22504ce2b1..a8dce3c2e85 100644
--- a/clang/lib/CodeGen/CGVTables.cpp
+++ b/clang/lib/CodeGen/CGVTables.cpp
@@ -336,7 +336,7 @@ void CodeGenFunction::EmitCallAndReturnForThunk(llvm::FunctionCallee Callee,
for (const ParmVarDecl *PD : MD->parameters())
EmitDelegateCallArg(CallArgs, PD, SourceLocation());
- const FunctionProtoType *FPT = MD->getType()->getAs<FunctionProtoType>();
+ const FunctionProtoType *FPT = MD->getType()->castAs<FunctionProtoType>();
#ifndef NDEBUG
const CGFunctionInfo &CallFnInfo = CGM.getTypes().arrangeCXXMethodCall(
OpenPOWER on IntegriCloud