projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dfed052
)
Fix "pointer is null" static analyzer warning. NFCI.
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Fri, 10 Jan 2020 17:40:34 +0000
(17:40 +0000)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Fri, 10 Jan 2020 17:41:26 +0000
(17:41 +0000)
Use castAs<> instead of getAs<> since the pointer is dereferenced immediately below and castAs will perform the null assertion for us.
clang/lib/CodeGen/CGVTables.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/CodeGen/CGVTables.cpp
b/clang/lib/CodeGen/CGVTables.cpp
index
c22504c
..
a8dce3c
100644
(file)
--- 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()->
ge
tAs<FunctionProtoType>();
+ const FunctionProtoType *FPT = MD->getType()->
cas
tAs<FunctionProtoType>();
#ifndef NDEBUG
const CGFunctionInfo &CallFnInfo = CGM.getTypes().arrangeCXXMethodCall(