forked from OSchip/llvm-project
Replace getAs with castAs to fix null dereference static analyzer warning.
Use castAs as we know the cast should succeed and we're dereferencing in the mangleBareFunctionType call.
This commit is contained in:
parent
40e7bfc424
commit
a8648fd19a
|
@ -1776,8 +1776,8 @@ void CXXNameMangler::mangleLambda(const CXXRecordDecl *Lambda) {
|
|||
void CXXNameMangler::mangleLambdaSig(const CXXRecordDecl *Lambda) {
|
||||
for (auto *D : Lambda->getLambdaExplicitTemplateParameters())
|
||||
mangleTemplateParamDecl(D);
|
||||
const FunctionProtoType *Proto = Lambda->getLambdaTypeInfo()->getType()->
|
||||
getAs<FunctionProtoType>();
|
||||
auto *Proto =
|
||||
Lambda->getLambdaTypeInfo()->getType()->castAs<FunctionProtoType>();
|
||||
mangleBareFunctionType(Proto, /*MangleReturnType=*/false,
|
||||
Lambda->getLambdaStaticInvoker());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue