[astgen] Use 'arg name' as 'param name' if there is no 'param name'.

This commit is contained in:
zoecarver
2022-10-30 11:32:43 -07:00
parent 3447dd7baa
commit f05302b58a

View File

@@ -186,6 +186,8 @@ void *ParamDecl_create(void *ctx, void *loc, void *_Nullable argLoc,
void *_Nullable type,
void *declContext) {
ASTContext &Context = *static_cast<ASTContext *>(ctx);
if (!paramName)
paramName = argName;
auto paramDecl = new (Context) ParamDecl(
getSourceLocFromPointer(loc), getSourceLocFromPointer(argLoc),
Identifier::getFromOpaquePointer(argName),