mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-25 21:11:25 +00:00
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.
This commit is contained in:
parent
dfed052fb3
commit
fd8ded99fe
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user