aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-10-23 16:09:54 +0200
committerP-E-P <32375388+P-E-P@users.noreply.github.com>2023-10-24 07:33:57 +0000
commit9a8b3eaeddb2d307a6b3f5cd2c85922f4dc6add4 (patch)
treebd23af3654bcb9fd26b5294323aa7a1ab987e5d0
parenteb393ac7a90b4b65fd3b0f66b666bf8b7c139c92 (diff)
Fix warning with overridden virtual methodsdevel/rust/master
Overridden virtual methods were not marked as such. gcc/rust/ChangeLog: * ast/rust-pattern.h: Add override modifier to overriding methods. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
-rw-r--r--gcc/rust/ast/rust-pattern.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/rust/ast/rust-pattern.h b/gcc/rust/ast/rust-pattern.h
index 4c072a1208c..68fee92bde5 100644
--- a/gcc/rust/ast/rust-pattern.h
+++ b/gcc/rust/ast/rust-pattern.h
@@ -49,7 +49,7 @@ public:
void accept_vis (ASTVisitor &vis) override;
- NodeId get_node_id () const { return node_id; }
+ NodeId get_node_id () const override { return node_id; }
Literal &get_literal () { return lit; }
@@ -147,7 +147,7 @@ public:
bool get_is_mut () const { return is_mut; }
bool get_is_ref () const { return is_ref; }
- NodeId get_node_id () const { return node_id; }
+ NodeId get_node_id () const override { return node_id; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -175,7 +175,7 @@ public:
void accept_vis (ASTVisitor &vis) override;
- NodeId get_node_id () const { return node_id; }
+ NodeId get_node_id () const override { return node_id; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -429,7 +429,7 @@ public:
return upper;
}
- NodeId get_node_id () const { return node_id; }
+ NodeId get_node_id () const override { return node_id; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -497,7 +497,7 @@ public:
bool get_is_mut () const { return is_mut; }
- NodeId get_node_id () const { return node_id; }
+ NodeId get_node_id () const override { return node_id; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -932,7 +932,7 @@ public:
PathInExpression &get_path () { return path; }
const PathInExpression &get_path () const { return path; }
- NodeId get_node_id () const { return node_id; }
+ NodeId get_node_id () const override { return node_id; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -1169,7 +1169,7 @@ public:
PathInExpression &get_path () { return path; }
const PathInExpression &get_path () const { return path; }
- NodeId get_node_id () const { return node_id; }
+ NodeId get_node_id () const override { return node_id; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -1409,7 +1409,7 @@ public:
return items;
}
- NodeId get_node_id () const { return node_id; }
+ NodeId get_node_id () const override { return node_id; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -1469,7 +1469,7 @@ public:
return pattern_in_parens;
}
- NodeId get_node_id () const { return node_id; }
+ NodeId get_node_id () const override { return node_id; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -1533,7 +1533,7 @@ public:
return items;
}
- NodeId get_node_id () const { return node_id; }
+ NodeId get_node_id () const override { return node_id; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -1598,7 +1598,7 @@ public:
return alts;
}
- NodeId get_node_id () const { return node_id; }
+ NodeId get_node_id () const override { return node_id; }
protected:
/* Use covariance to implement clone function as returning this object rather