Skip to content

Commit

Permalink
Fix for compilation warnings (#2446)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpadmasola committed Nov 28, 2023
1 parent cd6f2da commit 85bb047
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/ast/analysis/PrecedenceGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PrecedenceGraphAnalysis : public Analysis {
void print(std::ostream& os) const override;

/** Output precedence graph in image format to a given stream */
void printHTML(std::ostream& os) const;
void printHTML(std::ostream& os) const override;

const Graph<const Relation*, NameComparison>& graph() const {
return backingGraph;
Expand Down
2 changes: 1 addition & 1 deletion src/ast/analysis/SCCGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class SCCGraphAnalysis : public Analysis {
void print(std::ostream& os) const override;

/** Print the SCC graph in HTML format. */
void printHTML(std::ostream& os) const;
void printHTML(std::ostream& os) const override;

private:
PrecedenceGraphAnalysis* precedenceGraph = nullptr;
Expand Down
12 changes: 6 additions & 6 deletions src/tests/visitor_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace {
template <typename A, typename... XS>
auto asVec(XS&&... xs) {
vector<A> v;
(v.push_back(forward<XS>(xs)), ...);
(v.push_back(std::forward<XS>(xs)), ...);
return v;
}

Expand All @@ -54,7 +54,7 @@ struct Node {
VecOwn<Node> kids;

template <typename... A>
Node(A&&... xs) : kids(asVec<Own<Node>>(forward<A>(xs)...)) {}
Node(A&&... xs) : kids(asVec<Own<Node>>(std::forward<A>(xs)...)) {}

virtual vector<Node const*> getChildNodes() const {
return toPtrVector<Node const>(kids);
Expand Down Expand Up @@ -151,7 +151,7 @@ template <typename A, typename B>
void TEST_INSTANTIATION_MAPPER() {
A x;
mapPost(x, [&](Own<B> x) { return x; });
mapFrontier(x, [&](Own<B> x) { return pair{move(x), false}; });
mapFrontier(x, [&](Own<B> x) { return pair{std::move(x), false}; });
}

// Check that visitor function instantiates successfully.
Expand Down Expand Up @@ -209,7 +209,7 @@ TEST(NodeMapper, mapPrePost_BarToFoo) {

auto go = [](Own<NBar> n) {
auto x = mk<NFoo>();
x->kids = move(n->kids);
x->kids = std::move(n->kids);
return x;
};
EXPECT_EQ(*expected, *mapPre(mkTree(), go));
Expand All @@ -229,8 +229,8 @@ TEST(NodeMapper, mapFrontier_FooToBar) {

auto go = [](Own<NFoo> n) {
auto x = mk<NBar>();
x->kids = move(n->kids);
return pair{move(x), true};
x->kids = std::move(n->kids);
return pair{std::move(x), true};
};
auto&& [produced, n] = mapFrontier(mkTree(), go);

Expand Down

0 comments on commit 85bb047

Please sign in to comment.