forked from OSchip/llvm-project
Fix "pointer is null" static analyzer warnings. NFCI.
Use castAs<> instead of getAs<> since the pointers are dereferenced immediately and castAs will perform the null assertion for us.
This commit is contained in:
parent
ada22c804c
commit
54b2914acc
|
@ -270,8 +270,8 @@ static BaseOffset
|
|||
ComputeReturnAdjustmentBaseOffset(ASTContext &Context,
|
||||
const CXXMethodDecl *DerivedMD,
|
||||
const CXXMethodDecl *BaseMD) {
|
||||
const FunctionType *BaseFT = BaseMD->getType()->getAs<FunctionType>();
|
||||
const FunctionType *DerivedFT = DerivedMD->getType()->getAs<FunctionType>();
|
||||
const auto *BaseFT = BaseMD->getType()->castAs<FunctionType>();
|
||||
const auto *DerivedFT = DerivedMD->getType()->castAs<FunctionType>();
|
||||
|
||||
// Canonicalize the return types.
|
||||
CanQualType CanDerivedReturnType =
|
||||
|
|
Loading…
Reference in New Issue