llcppsigfetch:variadic order
This commit is contained in:
@@ -646,12 +646,12 @@ func (ct *Converter) ProcessFieldList(cursor clang.Cursor) *ast.FieldList {
|
||||
params: params,
|
||||
converter: ct,
|
||||
}
|
||||
clang.VisitChildren(cursor, visitFieldList, c.Pointer(ctx))
|
||||
if (cursor.Kind == clang.CursorFunctionDecl || isMethod(cursor)) && cursor.IsVariadic() != 0 {
|
||||
params.List = append(params.List, &ast.Field{
|
||||
Type: &ast.Variadic{},
|
||||
})
|
||||
}
|
||||
clang.VisitChildren(cursor, visitFieldList, c.Pointer(ctx))
|
||||
return params
|
||||
}
|
||||
|
||||
|
||||
@@ -122,16 +122,6 @@ TestFuncDecl Case 3:
|
||||
"Params": {
|
||||
"_Type": "FieldList",
|
||||
"List": [{
|
||||
"_Type": "Field",
|
||||
"Type": {
|
||||
"_Type": "Variadic"
|
||||
},
|
||||
"Doc": null,
|
||||
"Comment": null,
|
||||
"IsStatic": false,
|
||||
"Access": 0,
|
||||
"Names": null
|
||||
}, {
|
||||
"_Type": "Field",
|
||||
"Type": {
|
||||
"_Type": "BuiltinType",
|
||||
@@ -146,6 +136,16 @@ TestFuncDecl Case 3:
|
||||
"_Type": "Ident",
|
||||
"Name": "a"
|
||||
}]
|
||||
}, {
|
||||
"_Type": "Field",
|
||||
"Type": {
|
||||
"_Type": "Variadic"
|
||||
},
|
||||
"Doc": null,
|
||||
"Comment": null,
|
||||
"IsStatic": false,
|
||||
"Access": 0,
|
||||
"Names": null
|
||||
}]
|
||||
},
|
||||
"Ret": {
|
||||
|
||||
Reference in New Issue
Block a user