]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: nr2.0: Early resolve pending eager macro invocations
authorOwen Avery <powerboat9.gamer@gmail.com>
Sat, 11 Jan 2025 04:55:29 +0000 (23:55 -0500)
committerArthur Cohen <arthur.cohen@embecosm.com>
Fri, 21 Mar 2025 11:56:57 +0000 (12:56 +0100)
gcc/rust/ChangeLog:

* resolve/rust-early-name-resolver-2.0.cc
(Early::visit): Resolve the pending eager invocations inside
builtin macro invocations.

gcc/testsuite/ChangeLog:

* rust/compile/nr2/exclude: Remove entries.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
gcc/rust/resolve/rust-early-name-resolver-2.0.cc
gcc/testsuite/rust/compile/nr2/exclude

index 55330487fd7a7b47f3718bd87b46903b576b3c98..342f1027273a6d7bee1964cc34b5a29c510955de 100644 (file)
@@ -238,6 +238,10 @@ Early::visit (AST::MacroInvocation &invoc)
 {
   auto path = invoc.get_invoc_data ().get_path ();
 
+  if (invoc.get_kind () == AST::MacroInvocation::InvocKind::Builtin)
+    for (auto &pending_invoc : invoc.get_pending_eager_invocations ())
+      pending_invoc->accept_vis (*this);
+
   // When a macro is invoked by an unqualified identifier (not part of a
   // multi-part path), it is first looked up in textual scoping. If this does
   // not yield any results, then it is looked up in path-based scoping. If the
index 9b490c18bab401887875346eabca9e765d69062c..0f482df2f005ba2c8f2ff5b64b54de43597a8adc 100644 (file)
@@ -1,11 +1,6 @@
 bounds1.rs
 break-rust2.rs
 break-rust3.rs
-macros/builtin/eager1.rs
-macros/builtin/eager2.rs
-macros/builtin/recurse2.rs
-macros/builtin/include3.rs
-macros/builtin/include4.rs
 canonical_paths1.rs
 cfg1.rs
 cfg3.rs