diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-04-17 18:04:41 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:34:09 +0100 |
commit | a4bf0b62a6b854df9ebcc54c3802536486852eb1 (patch) | |
tree | 2a368e02a33812d54848394d42f3edee0d86e2a7 /gcc | |
parent | 9113e0760682d809fca60e9189c1721e4acf9c6f (diff) | |
download | gcc-a4bf0b62a6b854df9ebcc54c3802536486852eb1.zip gcc-a4bf0b62a6b854df9ebcc54c3802536486852eb1.tar.gz gcc-a4bf0b62a6b854df9ebcc54c3802536486852eb1.tar.bz2 |
gccrs: ast: Fix tokenstream function body
Function body were skipped in tokenstream when no return type was
provided.
gcc/rust/ChangeLog:
* ast/rust-ast-tokenstream.cc (TokenStream::visit_function_common):
Fix function body output.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/ast/rust-ast-tokenstream.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/rust/ast/rust-ast-tokenstream.cc b/gcc/rust/ast/rust-ast-tokenstream.cc index 78b5385..67b122a 100644 --- a/gcc/rust/ast/rust-ast-tokenstream.cc +++ b/gcc/rust/ast/rust-ast-tokenstream.cc @@ -1978,10 +1978,7 @@ TokenStream::visit_function_common (std::unique_ptr<Type> &return_type, if (block) { - if (return_type) - { - visit (block); - } + visit (block); } else { |