mirror of
https://github.com/nlohmann/json.git
synced 2026-10-08 15:37:13 +00:00
Silence -Wweak-vtables for the SAX event loggers
The loggers moved from anonymous namespaces in the test files into sax_event_loggers.hpp, so clang now warns that their vtables are emitted in every translation unit. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
1 file changed
+11
@@ -16,6 +16,13 @@
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
// the loggers are defined in this header only, so their vtables are emitted in
|
||||
// every test that includes it
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wweak-vtables"
|
||||
#endif
|
||||
|
||||
namespace utils
|
||||
{
|
||||
/// a SAX event consumer that records every event it receives as a
|
||||
@@ -172,3 +179,7 @@ struct SaxEventLoggerExitAfterStartArray : public SaxEventLogger
|
||||
}
|
||||
};
|
||||
} // namespace utils
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
Reference in new issue
Block a user