]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix expansion of macros inside modules
authorOwen Avery <powerboat9.gamer@gmail.com>
Sat, 22 Feb 2025 00:07:59 +0000 (19:07 -0500)
committerPhilip Herron <philip.herron@embecosm.com>
Sun, 23 Feb 2025 19:54:11 +0000 (19:54 +0000)
commitc3a707ae42bb15b84924d93ea99b040b190b21b1
tree8168fcee2c5c6e5e84dd1bc06997ada16a0d9511
parent5c675798ed7c6e753c44b9b7d5cfdc7ce8a4c2bb
Fix expansion of macros inside modules

gcc/rust/ChangeLog:

* expand/rust-expand-visitor.cc
(ExpandVisitor::visit): Override DefaultASTVisitor in order to
expand a module's items, rather than directly visit them.
* expand/rust-expand-visitor.h
(ExpandVisitor::visit): Add override.

gcc/testsuite/ChangeLog:

* rust/compile/macros/mbe/macro-expand-module.rs: New test.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
gcc/rust/expand/rust-expand-visitor.cc
gcc/rust/expand/rust-expand-visitor.h
gcc/testsuite/rust/compile/macros/mbe/macro-expand-module.rs [new file with mode: 0644]