Skip to content

Commit f05302b

Browse files
committed
[astgen] Use 'arg name' as 'param name' if there is no 'param name'.
1 parent 3447dd7 commit f05302b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/AST/CASTBridging.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ void *ParamDecl_create(void *ctx, void *loc, void *_Nullable argLoc,
186186
void *_Nullable type,
187187
void *declContext) {
188188
ASTContext &Context = *static_cast<ASTContext *>(ctx);
189+
if (!paramName)
190+
paramName = argName;
189191
auto paramDecl = new (Context) ParamDecl(
190192
getSourceLocFromPointer(loc), getSourceLocFromPointer(argLoc),
191193
Identifier::getFromOpaquePointer(argName),

0 commit comments

Comments
 (0)