mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[astgen] Use 'arg name' as 'param name' if there is no 'param name'.
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user