Skip to content

Commit

Permalink
AST - Fix compilation error on some clang installs (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
thepowersgang committed Nov 6, 2019
1 parent f1c5c54 commit 9976580
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 7 additions & 0 deletions src/ast/ast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ const Attribute* AttributeList::get(const char *name) const
return 0;
}

::std::ostream& operator<<(::std::ostream& os, const AttributeList& x) {
for(const auto& i : x.m_items) {
os << "#[" << i << "]";
}
return os;
}

Attribute Attribute::clone() const
{
TU_MATCHA( (m_data), (e),
Expand Down
7 changes: 1 addition & 6 deletions src/ast/attrs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,7 @@ class AttributeList
return get(name) != 0;
}

friend ::std::ostream& operator<<(::std::ostream& os, const AttributeList& x) {
for(const auto& i : x.m_items) {
os << "#[" << i << "]";
}
return os;
}
friend ::std::ostream& operator<<(::std::ostream& os, const AttributeList& x);
};


Expand Down

0 comments on commit 9976580

Please sign in to comment.