Fix syntax error parsing variadic template parameter pack arguments

that are function pointers

Issue #1863
This commit is contained in:
William S Fulton 2022-12-23 16:25:50 +00:00
commit 70837bbc26
3 changed files with 32 additions and 6 deletions

View file

@ -5535,11 +5535,6 @@ declarator : pointer notso_direct_declarator {
$$.type = $1;
SwigType_add_variadic($$.type);
}
| ELLIPSIS direct_declarator {
$$ = $2;
if (!$$.type) $$.type = NewStringEmpty();
SwigType_add_variadic($$.type);
}
| AND ELLIPSIS notso_direct_declarator {
$$ = $3;
$$.type = NewStringEmpty();
@ -6170,6 +6165,10 @@ rawtype : type_qualifier type_right {
SwigType_push($$,$3);
SwigType_push($$,$1);
}
| rawtype ELLIPSIS {
$$ = $1;
SwigType_add_variadic($$);
}
;
type_right : primitive_type { $$ = $1;