summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2019-11-07 02:23:43 +0800
committerJohn Hodge <tpg@mutabah.net>2019-11-07 02:23:43 +0800
commit9976580f96b3fd10d90250f9d977e44e2ab9198d (patch)
tree451bd89f0be28ca6801289b97914911d31d375ad
parentf1c5c54cac4cbdec7dd8bd2c59b1dc3ac59c3f7b (diff)
downloadmrust-9976580f96b3fd10d90250f9d977e44e2ab9198d.tar.gz
AST - Fix compilation error on some clang installs (#118)
-rw-r--r--src/ast/ast.cpp7
-rw-r--r--src/ast/attrs.hpp7
2 files changed, 8 insertions, 6 deletions
diff --git a/src/ast/ast.cpp b/src/ast/ast.cpp
index 827ac2d1..4cb00610 100644
--- a/src/ast/ast.cpp
+++ b/src/ast/ast.cpp
@@ -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),
diff --git a/src/ast/attrs.hpp b/src/ast/attrs.hpp
index 7a6ce864..193305b7 100644
--- a/src/ast/attrs.hpp
+++ b/src/ast/attrs.hpp
@@ -47,12 +47,7 @@ public:
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);
};