ASTMangler: EnumElementDecl could also be a DeclContext with a parameter list

This commit is contained in:
Xi Ge
2019-10-09 16:18:35 -07:00
parent 014f863546
commit a877fe6ee3

View File

@@ -587,6 +587,8 @@ static unsigned getUnnamedParamIndex(const ParamDecl *D) {
if (auto AFD = dyn_cast<AbstractFunctionDecl>(D->getDeclContext())) {
ParamList = AFD->getParameters();
} else if (auto EED = dyn_cast<EnumElementDecl>(D->getDeclContext())) {
ParamList = EED->getParameterList();
} else {
auto ACE = cast<AbstractClosureExpr>(D->getDeclContext());
ParamList = ACE->getParameters();