diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2025-09-02 15:58:26 -0700 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2025-09-02 15:58:26 -0700 |
commit | 071b4126c613881f4cb25b4e5c39032964827f88 (patch) | |
tree | 7ed805786566918630d1d617b1ed8f7310f5fd8e /gcc/rust/expand/rust-expand-visitor.h | |
parent | 845d23f3ea08ba873197c275a8857eee7edad996 (diff) | |
parent | caa1c2f42691d68af4d894a5c3e700ecd2dba080 (diff) | |
download | gcc-devel/gfortran-test.zip gcc-devel/gfortran-test.tar.gz gcc-devel/gfortran-test.tar.bz2 |
Merge branch 'master' into gfortran-testdevel/gfortran-test
Diffstat (limited to 'gcc/rust/expand/rust-expand-visitor.h')
-rw-r--r-- | gcc/rust/expand/rust-expand-visitor.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/rust/expand/rust-expand-visitor.h b/gcc/rust/expand/rust-expand-visitor.h index ad237c0..845e10c 100644 --- a/gcc/rust/expand/rust-expand-visitor.h +++ b/gcc/rust/expand/rust-expand-visitor.h @@ -28,14 +28,12 @@ namespace Rust { /** * Whether or not an attribute is a derive attribute */ -bool -is_derive (AST::Attribute &attr); +bool is_derive (AST::Attribute &attr); /** * Whether or not an attribute is builtin */ -bool -is_builtin (AST::Attribute &attr); +bool is_builtin (AST::Attribute &attr); class ExpandVisitor : public AST::DefaultASTVisitor { @@ -107,7 +105,7 @@ public: */ template <typename T, typename U> void expand_macro_children (MacroExpander::ContextType ctx, T &values, - std::function<U (AST::SingleASTNode)> extractor) + U (AST::SingleASTNode::*extractor) (void)) { expander.push_context (ctx); @@ -123,7 +121,7 @@ public: */ template <typename T, typename U> void expand_macro_children (T &values, - std::function<U (AST::SingleASTNode)> extractor) + U (AST::SingleASTNode::*extractor) (void)) { for (auto it = values.begin (); it != values.end ();) { @@ -140,7 +138,7 @@ public: it = values.erase (it); for (auto &node : final_fragment.get_nodes ()) { - U new_node = extractor (node); + U new_node = (node.*extractor) (); if (new_node != nullptr) { it = values.insert (it, std::move (new_node)); @@ -211,7 +209,7 @@ public: void visit (AST::AttrInputLiteral &) override; void visit (AST::AttrInputMacro &) override; void visit (AST::MetaItemLitExpr &) override; - void visit (AST::MetaItemPathLit &) override; + void visit (AST::MetaItemPathExpr &) override; void visit (AST::ErrorPropagationExpr &expr) override; void visit (AST::ArithmeticOrLogicalExpr &expr) override; void visit (AST::ComparisonExpr &expr) override; |