diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-06-28 15:12:11 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:49:33 +0100 |
commit | d862c1bbcf407135cfe481bca7c41c2a48af32db (patch) | |
tree | 1fb7aab9e1d4086f80b901d218e9a83fbe1a65b1 /gcc | |
parent | 06594902eb755557a4f2f1cc81dfa901681efed1 (diff) | |
download | gcc-d862c1bbcf407135cfe481bca7c41c2a48af32db.zip gcc-d862c1bbcf407135cfe481bca7c41c2a48af32db.tar.gz gcc-d862c1bbcf407135cfe481bca7c41c2a48af32db.tar.bz2 |
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 <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/ast/rust-ast-collector.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc index fedff55..c06605a 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 ()) |