aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-11-22 15:15:29 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-30 12:36:48 +0100
commit7a989394795a740dd4bcabbba251428cc9df08f1 (patch)
treee9f16f97ff064b3ed9ab12f874ba4e680a33e4fe /gcc/c
parentf5e04e40490e57bff2da0568ab9e67a33e644898 (diff)
downloadgcc-7a989394795a740dd4bcabbba251428cc9df08f1.zip
gcc-7a989394795a740dd4bcabbba251428cc9df08f1.tar.gz
gcc-7a989394795a740dd4bcabbba251428cc9df08f1.tar.bz2
gccrs: Make function bodies truly optional
Missing body on a function should be rejected at a later stage in the compiler, not during parsing. gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Adapt defintion getter. * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise. * expand/rust-cfg-strip.cc (CfgStrip::visit): Likewise. * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Likewise. * hir/rust-ast-lower-implitem.h: Likewise. * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Likewise. * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Likewise. * resolve/rust-ast-resolve-stmt.h: Likewise. * resolve/rust-default-resolver.cc (DefaultResolver::visit): Likewise. * util/rust-attributes.cc (AttributeChecker::visit): Likewise. * parse/rust-parse-impl.h: Allow empty function body during parsing. * ast/rust-ast.cc (Function::Function): Constructor now take an optional for the body. (Function::operator=): Adapt to new optional member. (Function::as_string): Likewise. * ast/rust-item.h (class Function): Make body optional and do not rely on nullptr anymore. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions