From: Pierre-Emmanuel Patry Date: Wed, 28 Jun 2023 13:12:11 +0000 (+0200) Subject: gccrs: collector: Add variadics to collector output X-Git-Tag: basepoints/gcc-15~2383 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d862c1bbcf407135cfe481bca7c41c2a48af32db;p=thirdparty%2Fgcc.git gccrs: collector: Add variadics to collector output Variadics were missing from collector output for external functions. gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Add variadics in collector output. Signed-off-by: Pierre-Emmanuel Patry --- diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc index fedff55ee15f..c06605a8c716 100644 --- a/gcc/rust/ast/rust-ast-collector.cc +++ b/gcc/rust/ast/rust-ast-collector.cc @@ -2197,6 +2197,13 @@ TokenCollector::visit (ExternalFunctionItem &function) push (Rust::Token::make (LEFT_PAREN, Location ())); visit_items_joined_by_separator (function.get_function_params ()); + if (function.is_variadic ()) + { + push (Rust::Token::make (COMMA, Location ())); + // TODO: Add variadic outer attributes? + // TODO: Add variadic name once implemented. + push (Rust::Token::make (ELLIPSIS, Location ())); + } push (Rust::Token::make (RIGHT_PAREN, Location ())); if (function.has_return_type ())