Skip to content
Snippets Groups Projects
Commit 4c4f8a9e authored by Sean McBride's avatar Sean McBride
Browse files

Supress clang warnings about dynamic exception specifications

Suppressed because the methods in question are meant to reproduce
STL (ex: std::auto_ptr) signatures exactly.

Change-Id: I3705f8383872c3c4c3787f5ae458e840298c7df1
parent e39f85e0
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,17 @@
# define @KWSYS_NAMESPACE@_AUTO_PTR_CAST(a) a
#endif
// In C++11, clang will warn about using dynamic exception specifications
// as they are deprecated. But as this class is trying to faithfully
// mimic std::auto_ptr, we want to keep the 'throw()' decorations below.
// So we suppress the warning.
#if defined(__clang__) && defined(__has_warning)
# if __has_warning("-Wdeprecated")
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated"
# endif
#endif
namespace @KWSYS_NAMESPACE@
{
......@@ -198,4 +209,11 @@ public:
} // namespace @KWSYS_NAMESPACE@
// Undo warning suppression.
#if defined(__clang__) && defined(__has_warning)
# if __has_warning("-Wdeprecated")
# pragma clang diagnostic pop
# endif
#endif
#endif
......@@ -62,6 +62,17 @@
# pragma set woff 3970 /* pointer to int conversion */ 3321 3968
#endif
// In C++11, clang will warn about using dynamic exception specifications
// as they are deprecated. But as this class is trying to faithfully
// mimic unordered_set and unordered_map, we want to keep the 'throw()'
// decorations below. So we suppress the warning.
#if defined(__clang__) && defined(__has_warning)
# if __has_warning("-Wdeprecated")
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated"
# endif
#endif
#if @KWSYS_NAMESPACE@_STL_HAS_ALLOCATOR_TEMPLATE
# define @KWSYS_NAMESPACE@_HASH_DEFAULT_ALLOCATOR(T) @KWSYS_NAMESPACE@_stl::allocator< T >
#elif @KWSYS_NAMESPACE@_STL_HAS_ALLOCATOR_NONTEMPLATE
......@@ -1268,6 +1279,13 @@ using @KWSYS_NAMESPACE@::operator==;
using @KWSYS_NAMESPACE@::operator!=;
#endif
// Undo warning suppression.
#if defined(__clang__) && defined(__has_warning)
# if __has_warning("-Wdeprecated")
# pragma clang diagnostic pop
# endif
#endif
#if defined(_MSC_VER)
# pragma warning (pop)
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment