From 6b3c00e4408d2167480347773523aa3d7232c939 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 25 May 2016 17:15:28 -0700 Subject: [PATCH] Fix clang warnings (#250) --- fmt/format.cc | 5 +++++ fmt/format.h | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fmt/format.cc b/fmt/format.cc index ad3a1cb0008ce..b8c22b7024716 100644 --- a/fmt/format.cc +++ b/fmt/format.cc @@ -357,8 +357,13 @@ class CharConverter : public ArgVisitor { }; } // namespace +FMT_FUNC FormatError::~FormatError() {} +FMT_FUNC SystemError::~SystemError() {} + namespace internal { +FMT_FUNC RuntimeError::~RuntimeError() {} + // This method is used to preserve binary compatibility with fmt 3.0. // It can be removed in 4.0. FMT_FUNC void format_system_error( diff --git a/fmt/format.h b/fmt/format.h index 7cdac979a80d4..ab939af65d60e 100644 --- a/fmt/format.h +++ b/fmt/format.h @@ -105,7 +105,7 @@ typedef __int64 intmax_t; #if defined(__clang__) && !defined(FMT_ICC_VERSION) # pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wdocumentation" +# pragma clang diagnostic ignored "-Wdocumentation-unknown-command" #endif #ifdef __GNUC_LIBSTD__ @@ -538,6 +538,7 @@ class FormatError : public std::runtime_error { public: explicit FormatError(CStringRef message) : std::runtime_error(message.c_str()) {} + ~FormatError() FMT_NOEXCEPT; }; namespace internal { @@ -1316,6 +1317,7 @@ struct NamedArg : Arg { class RuntimeError : public std::runtime_error { protected: RuntimeError() : std::runtime_error("") {} + ~RuntimeError() FMT_NOEXCEPT; }; template @@ -2278,6 +2280,7 @@ class SystemError : public internal::RuntimeError { init(error_code, message, ArgList()); } FMT_VARIADIC_CTOR(SystemError, init, int, CStringRef) + ~SystemError() FMT_NOEXCEPT; int error_code() const { return error_code_; } };