Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include/internal
diff options
context:
space:
mode:
authorPhil Nash2014-05-19 18:57:14 +0100
committerPhil Nash2014-05-19 18:57:14 +0100
commit3bdc97d8ad742028bb40232bd073bab09e6a1cd0 (patch)
tree97e21fdc77b85f2e851a46739715de7fbf65b5d1 /include/internal
parentebd4888fe1ea1a9c2f38c0e674c18005632d63f0 (diff)
downloadcatch3-3bdc97d8ad742028bb40232bd073bab09e6a1cd0.tar.gz
Suppressed a load of warnings
Diffstat (limited to 'include/internal')
-rw-r--r--include/internal/catch_console_colour.hpp1
-rw-r--r--include/internal/catch_message.h1
-rw-r--r--include/internal/catch_message.hpp4
-rw-r--r--include/internal/catch_notimplemented_exception.h1
-rw-r--r--include/internal/catch_reenable_warnings.h15
-rw-r--r--include/internal/catch_suppress_warnings.h21
-rw-r--r--include/internal/catch_xmlwriter.hpp46
7 files changed, 69 insertions, 20 deletions
diff --git a/include/internal/catch_console_colour.hpp b/include/internal/catch_console_colour.hpp
index 3ea81788..b884df43 100644
--- a/include/internal/catch_console_colour.hpp
+++ b/include/internal/catch_console_colour.hpp
@@ -58,6 +58,7 @@ namespace Catch {
static void use( Code _colourCode );
private:
+ Colour( Colour const& other );
static Detail::IColourImpl* impl();
};
diff --git a/include/internal/catch_message.h b/include/internal/catch_message.h
index d0886654..84ff95ea 100644
--- a/include/internal/catch_message.h
+++ b/include/internal/catch_message.h
@@ -55,6 +55,7 @@ namespace Catch {
class ScopedMessage {
public:
ScopedMessage( MessageBuilder const& builder );
+ ScopedMessage( ScopedMessage const& other );
~ScopedMessage();
MessageInfo m_info;
diff --git a/include/internal/catch_message.hpp b/include/internal/catch_message.hpp
index 8f303f7a..42866be8 100644
--- a/include/internal/catch_message.hpp
+++ b/include/internal/catch_message.hpp
@@ -33,6 +33,10 @@ namespace Catch {
m_info.message = builder.m_stream.str();
getResultCapture().pushScopedMessage( m_info );
}
+ ScopedMessage::ScopedMessage( ScopedMessage const& other )
+ : m_info( other.m_info )
+ {}
+
ScopedMessage::~ScopedMessage() {
getResultCapture().popScopedMessage( m_info );
}
diff --git a/include/internal/catch_notimplemented_exception.h b/include/internal/catch_notimplemented_exception.h
index 84b1cf3f..2e38b98f 100644
--- a/include/internal/catch_notimplemented_exception.h
+++ b/include/internal/catch_notimplemented_exception.h
@@ -17,6 +17,7 @@ namespace Catch {
{
public:
NotImplementedException( SourceLineInfo const& lineInfo );
+ NotImplementedException( NotImplementedException const& ) {}
virtual ~NotImplementedException() CATCH_NOEXCEPT {}
diff --git a/include/internal/catch_reenable_warnings.h b/include/internal/catch_reenable_warnings.h
new file mode 100644
index 00000000..fbdfebc0
--- /dev/null
+++ b/include/internal/catch_reenable_warnings.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2014 Two Blue Cubes Ltd
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#ifndef TWOBLUECUBES_CATCH_REENABLE_WARNINGS_H_INCLUDED
+#define TWOBLUECUBES_CATCH_REENABLE_WARNINGS_H_INCLUDED
+
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
+#endif // TWOBLUECUBES_CATCH_REENABLE_WARNINGS_H_INCLUDED
diff --git a/include/internal/catch_suppress_warnings.h b/include/internal/catch_suppress_warnings.h
new file mode 100644
index 00000000..e5cfdc56
--- /dev/null
+++ b/include/internal/catch_suppress_warnings.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2014 Two Blue Cubes Ltd
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#ifndef TWOBLUECUBES_CATCH_SUPPRESS_WARNINGS_H_INCLUDED
+#define TWOBLUECUBES_CATCH_SUPPRESS_WARNINGS_H_INCLUDED
+
+#ifdef __clang__
+#pragma clang diagnostic ignored "-Wglobal-constructors"
+#pragma clang diagnostic ignored "-Wvariadic-macros"
+#pragma clang diagnostic ignored "-Wc99-extensions"
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wpadded"
+#pragma clang diagnostic ignored "-Wc++98-compat"
+#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
+#endif
+
+#endif // TWOBLUECUBES_CATCH_SUPPRESS_WARNINGS_H_INCLUDED
diff --git a/include/internal/catch_xmlwriter.hpp b/include/internal/catch_xmlwriter.hpp
index 3b19b945..52d66bce 100644
--- a/include/internal/catch_xmlwriter.hpp
+++ b/include/internal/catch_xmlwriter.hpp
@@ -66,26 +66,26 @@ namespace Catch {
endElement();
}
-# ifndef CATCH_CPP11_OR_GREATER
- XmlWriter& operator = ( XmlWriter const& other ) {
- XmlWriter temp( other );
- swap( temp );
- return *this;
- }
-# else
- XmlWriter( XmlWriter const& ) = default;
- XmlWriter( XmlWriter && ) = default;
- XmlWriter& operator = ( XmlWriter const& ) = default;
- XmlWriter& operator = ( XmlWriter && ) = default;
-# endif
-
- void swap( XmlWriter& other ) {
- std::swap( m_tagIsOpen, other.m_tagIsOpen );
- std::swap( m_needsNewline, other.m_needsNewline );
- std::swap( m_tags, other.m_tags );
- std::swap( m_indent, other.m_indent );
- std::swap( m_os, other.m_os );
- }
+//# ifndef CATCH_CPP11_OR_GREATER
+// XmlWriter& operator = ( XmlWriter const& other ) {
+// XmlWriter temp( other );
+// swap( temp );
+// return *this;
+// }
+//# else
+// XmlWriter( XmlWriter const& ) = default;
+// XmlWriter( XmlWriter && ) = default;
+// XmlWriter& operator = ( XmlWriter const& ) = default;
+// XmlWriter& operator = ( XmlWriter && ) = default;
+//# endif
+//
+// void swap( XmlWriter& other ) {
+// std::swap( m_tagIsOpen, other.m_tagIsOpen );
+// std::swap( m_needsNewline, other.m_needsNewline );
+// std::swap( m_tags, other.m_tags );
+// std::swap( m_indent, other.m_indent );
+// std::swap( m_os, other.m_os );
+// }
XmlWriter& startElement( std::string const& name ) {
ensureTagClosed();
@@ -163,7 +163,13 @@ namespace Catch {
return *this;
}
+ void setStream( std::ostream& os ) {
+ m_os = &os;
+ }
+
private:
+ XmlWriter( XmlWriter const& );
+ void operator=( XmlWriter const& );
std::ostream& stream() {
return *m_os;