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>
|
#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
|
namespace utils
|
||||||
{
|
{
|
||||||
/// a SAX event consumer that records every event it receives as a
|
/// a SAX event consumer that records every event it receives as a
|
||||||
@@ -172,3 +179,7 @@ struct SaxEventLoggerExitAfterStartArray : public SaxEventLogger
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace utils
|
} // namespace utils
|
||||||
|
|
||||||
|
#if defined(__clang__)
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
Reference in new issue
Block a user