Kaydet (Commit) 74bb3cf5 authored tarafından Andrzej Hunt's avatar Andrzej Hunt

Add clang support for boost multi_array Wshadow patch.

ba54eca1 replaces the existing -Wshadow
fixes with a GCC pragma, however we also want to be able to build with clang.

Change-Id: I522f3c549adf65b98522561ab7167258dfda48b5
üst dbbaa85d
...@@ -11,7 +11,7 @@ diff --git a/include/boost/multi_array.hpp b/include/boost/multi_array.hpp ...@@ -11,7 +11,7 @@ diff --git a/include/boost/multi_array.hpp b/include/boost/multi_array.hpp
index 8193699..72b2294 100644 index 8193699..72b2294 100644
--- a/include/boost/multi_array.hpp --- a/include/boost/multi_array.hpp
+++ b/include/boost/multi_array.hpp +++ b/include/boost/multi_array.hpp
@@ -18,6 +18,11 @@ @@ -18,6 +18,16 @@
// declaration and definition // declaration and definition
// //
...@@ -19,17 +19,26 @@ index 8193699..72b2294 100644 ...@@ -19,17 +19,26 @@ index 8193699..72b2294 100644
+# pragma GCC diagnostic push +# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wshadow" +# pragma GCC diagnostic ignored "-Wshadow"
+#endif +#endif
+
+#if defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wshadow"
+#endif
+ +
#include "boost/multi_array/base.hpp" #include "boost/multi_array/base.hpp"
#include "boost/multi_array/collection_concept.hpp" #include "boost/multi_array/collection_concept.hpp"
#include "boost/multi_array/copy_array.hpp" #include "boost/multi_array/copy_array.hpp"
@@ -496,4 +501,8 @@ private: @@ -496,4 +501,12 @@ private:
} // namespace boost } // namespace boost
+#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406) +#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 406)
+# pragma GCC diagnostic pop +# pragma GCC diagnostic pop
+#endif +#endif
+
+#if defined(__clang__)
+# pragma clang diagnostic pop
+#endif
+ +
#endif // BOOST_MULTI_ARRAY_RG071801_HPP #endif // BOOST_MULTI_ARRAY_RG071801_HPP
-- --
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment